4D v164D Widget components |
||
|
4D v16
4D Widget components
4D Widget components
4D widgets are functionalities provided as components that can be accessed from the Form editor and/or the preconfigured object library. These widgets are compound objects with predefined characteristics. They provide access to standard functions and are very simple to implement. Three widgets are available:
These widgets can be used with or without programming. You can simply integrate them into your forms and use their default properties. If you want to be able to control and configure them in a more customized manner, you can make use of specific project methods, called "Component methods," which are listed by component on the Methods page of the Explorer: This documentation covers each widget and describes the syntax of the component methods associated with it. There are two ways to insert a widget area in a form:
To insert a widget using the object library:
To create a widget via a subform type object:
Widgets are based on 4D subforms and are therefore subject to the same operating principles. You should pay particular attention to their initialization. For optimization purposes, subform objects are instantiated by 4D only when the subform is displayed. This means that method calls via EXECUTE METHOD IN SUBFORM or access to dynamic objects in subforms are not possible until the subform is displayed on the current page. When you place widgets on form pages other than page 1, it is not possible to call an initialization method (such as TimePicker SET STEP) in the On Load form event, because at the time of its execution the widget will not be instantiated. To handle this case, widget areas return a specific event with a value of -1 to indicate that they are loaded and ready for use. This event must be tested at the object method level of the widget itself, in the same way as the On Data Change, On Load etc. Therefore when the widget is located on a form page other than page 1, it's necessary to write: If(Form event=-1) // the widget is instantiated and can be initialized rather than: If(Form event=On Load) // only works if the widget is on page 1
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Widgets ( 4D v16) |