[Solved] Event triggers for text control?
-
- Posts: 93
- Joined: Tue Nov 08, 2016 8:04 am
[Solved] Event triggers for text control?
On a form I can add controls and they all have associated events which can trigger macros. The only type of control not having events seem to be those associated with a table - at least, the form has an associated table it can scroll through and controls on the form are tied to fields in the table. Is this right, or am I misunderstanding something?
To explain further: I would like to raise a visual flag if a certain value appears in a control as the user scrolls through the records and I was going to use control events for this, but there don't seem to be any events.
Any help would be appreciated.
To explain further: I would like to raise a visual flag if a certain value appears in a control as the user scrolls through the records and I was going to use control events for this, but there don't seem to be any events.
Any help would be appreciated.
Last edited by owlbrudder on Wed Nov 09, 2016 3:37 am, edited 1 time in total.
LibreOffice Version: 5.3.3.0
Fedora 26 Linux x86_64
Core i7, 8Gb
Fedora 26 Linux x86_64
Core i7, 8Gb
Re: Event triggers for text control?
A table control on a form is a bundle of controls. Each column represents one control of any type. See column properties. There is no formatting for individual rows nor columns and no macro can add this missing feature. The best you can get without macros is a formatted field with conditional number format. Formatted fields are very much like numeric spreadsheet cells with the same number format attributes, e.g. red font color for negative numbers: #,##0.00;[RED]-#,##0.00
Reports can do more if you use the report builder extension or if you use Calc for database reports.
Reports can do more if you use the report builder extension or if you use Calc for database reports.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 93
- Joined: Tue Nov 08, 2016 8:04 am
Re: Event triggers for text control?
Thanks for the quick response. I have found I can manully add a text control (for example) and set its datasource as a field of the form's recordset and this control retains all its events, so I have a work-around for when I need it.
Cheers,
Doug
Cheers,
Doug
LibreOffice Version: 5.3.3.0
Fedora 26 Linux x86_64
Core i7, 8Gb
Fedora 26 Linux x86_64
Core i7, 8Gb
Re: Event triggers for text control?
You can also hide and unhide form controls.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Event triggers for text control?
Hello,
find attached another approach, using a query to find the event and display the information in a textcontrol having the same backgroundcolor as the form itself. An information will appear, if the NUMBER is less than -50.
find attached another approach, using a query to find the event and display the information in a textcontrol having the same backgroundcolor as the form itself. An information will appear, if the NUMBER is less than -50.
- Attachments
-
- TriggerEvent.odb
- (16.9 KiB) Downloaded 268 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 11 AOO, LO | Linux Mint AOO, LO
-
- Posts: 93
- Joined: Tue Nov 08, 2016 8:04 am
Re: Event triggers for text control?
Good - I was counting on that for when I use a manually-created data control. I would have the standard control invisible and my control over the top of it. Thanks for the suggestion.Villeroy wrote:hide and unhide form controls.
LibreOffice Version: 5.3.3.0
Fedora 26 Linux x86_64
Core i7, 8Gb
Fedora 26 Linux x86_64
Core i7, 8Gb
-
- Posts: 93
- Joined: Tue Nov 08, 2016 8:04 am
Re: Event triggers for text control?
Thanks - that is very kind of you. I will study your technique as it sounds like a simplification of what I was planning to do.F3K Total wrote:find attached another approach
... Later ...
F3K Total, solving the problem through SQL is a neat alternative. Now I can use either method depending on the circumstances. Thank you again.

LibreOffice Version: 5.3.3.0
Fedora 26 Linux x86_64
Core i7, 8Gb
Fedora 26 Linux x86_64
Core i7, 8Gb
Re: [Solved] Event triggers for text control?
Hello,
find attached a combination of Villeroys idea and a query, using a number in a formatted field of a grid control to display a colored text. Looks like this: The query gives back 0 or 1, and the field is formatted like this:
find attached a combination of Villeroys idea and a query, using a number in a formatted field of a grid control to display a colored text. Looks like this: The query gives back 0 or 1, and the field is formatted like this:
Code: Select all
[<=0][RED]"ATTENTION, less than -50!!!";[>0][BLACK];General
- Attachments
-
- TriggerEvent2.odb
- (17.91 KiB) Downloaded 253 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 11 AOO, LO | Linux Mint AOO, LO
-
- Posts: 93
- Joined: Tue Nov 08, 2016 8:04 am
Re: [Solved] Event triggers for text control?
Yes, that is a good solution for a grid or list fed by a query rather than directly by a table.F3K Total wrote:The query gives back 0 or 1, and the field is formatted like this:Code: Select all
[<=0][RED]"ATTENTION, less than -50!!!";[>0][BLACK];General
I expect there are other ways to approach this as well, so I have some more study to do. Many thanks for taking the time to help.
Cheers,
Doug
LibreOffice Version: 5.3.3.0
Fedora 26 Linux x86_64
Core i7, 8Gb
Fedora 26 Linux x86_64
Core i7, 8Gb