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 that provide access to standard functionalities and are very simple to implement.
Three widgets are available:
- SearchPicker: search area with standard appearance.
- DatePicker: date selector.
- TimePicker: time selector.
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:
![](../../picture/307590/pict307590.en.png)
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:
- Using the object library
- Using a subform
To insert a widget using the object library:
- Select the Object Library command from the Design menu.
The Object Library window appears. - Select Widgets in the Category menu.
All the available widgets are listed:
![](../../picture/307739/pict307739.en.png)
- Insert the desired widget into your form by dragging and dropping it.
You can then configure it via the properties of the inserted object or via its object method.
To create a widget via a subform type object:
- In the Form editor, add a subform object.
This point is described in the 4D Design Reference manual. - In the Property List, click on the "Detail Form" menu to scroll through the list of forms that can be used. This list includes the widgets.
![](../../picture/307757/pict307757.en.png)
- Select the widget to be inserted.
You can then configure it via the object properties or the object method of the subform.