Specifying a Widget for a Field or Entity
By default, Uniface displays most fields as edit boxes, but you can change this by selecting a different widget and optionally setting its widget properties. You can do this at the model level, for example in modeled entities or modeled components, or you can do this in the components themselves.
When you create a modeled entity or field, the template you use defines the widget to be used for each type of component. In most cases, this is the EditBox widget but for Boolean fields, it is the CheckBox.
To change the widget of an entity or field in a modeled entity:
- In the Entity Editor, select the object in the Structure.
-
In the Properties Inspector, go to the Presentation properties and for each component type, choose the type of widge
t you want to use.
When you add a modeled entity and its fields to the component structure, each object inherits the widget defined in the modeled object.
You can override this choice in the component. For example, you may want to use a Datepicker instead of an EditBox for a Date field.
-
In the Properties Inspector, choose the widget from Widget Type property. For example:
Component Editor: DSP Widget Type
You can also add non-modeled entities and fields to a component. For fields, you can select a field template that specifies the widget.
-
In the Templates tab, select a field template and add it to the component structure or for form components, draw it on the canvas.
Component Editor: Templates Tab
See also Setting Widget Properties