Tech Tip: Using widgets on page 2+
PRODUCT: 4D | VERSION: 13.3 | PLATFORM: Mac & Win
Published On: August 8, 2013
When using a widget, like the date picker for example, on form pages greater than 1 you may find that calling the widget commands in the On Load event do not work like they do on Page 1.
To accomodate the widget on pages greater than 1 the developer should use a Timer event instead of the On Load event. The timer should be initiated on the object used for switching pages, such as a tab object:
// Tab object method Case of :(Form Event=On Clicked) SET TIMER(1) end case |
Then, within the On Timer event, call the widget commands like this:
// Form Method Case of :(Form Event=On Timer) SET TIMER(0) // reset back to 0 Date Picker SET WEEK FIRST DAY("mycalendar";Sunday) end case |