In Uniface, the user interface of a component is implemented by means of widgets, which represent individual objects, determine their appearance, and control the kinds of user interactions it supports.

Explicit and Implicit Widgets

For fields and entities, you can explicitly choose the widget you want to use to represent the data. For example, you can choose whether a field should be an edit box or a check box, a list or radio buttons, a picture or a button. In forms, you can choose whether to use default entity widget or the grid widget.

For components and occurrences, the associated widget is implicit, meaning that it is built-in. You do not have a choice of another widget. For example, the layout of a component is really a property of its implicit widget. In the case of desktop applications, you can also set window properties of the application shell and form components to control aspects of it appearance and user control. Occurrence widgets are built in to the parent entity.

Note: Because component and occurrence widgets are implicit, the term widgets usually refers to field-level widgets, and sometimes to entity-level widgets.

Physical and Logical Widgets

A widget is a user interface control. It can display data values, control how values are modified, and it determines the field or entity's appearance. Uniface widgets are physical widgets, but named configurations, called logical widgets, are used to set preferred widget property values.

Logical widgets for fields and entities in forms and dynamic server pages map to a physical widget and may set some of its properties. A single (physical) widget may therefore have multiple logical widgets mapped to it.

Uniface provides default sets of logical widgets for forms and dynamic server pages. These are the widgets that are visible in the Widget Type property of entities and fields, and they are used by the default templates provided with the Uniface IDE. For more information, see Logical Widgets.

Widget Properties

Each physical widget has an associated set of properties that affect how the data is presented in the user interface. These properties can be set in the usys.ini file, in object definitions, and in script.

The effect of widget properties depends on the user interface technology, the parent object, and the property itself. For example, if no background color is defined for a field-level widget, it may inherit the color from a parent occurrence, entity, or component.

For more information, see Properties for Styling the User Interface.

Widget Appearance

The appearance of a widget at runtime is determined by the following:

  • Type of component. Each type of component has its own set of supported widgets, and each widget has its own set of properties. For example, the Form, Dynamic Server Page, and Static Server Page each have widget for an edit box used to enter data, but the widgets are not the same and they have different properties and triggers.
  • Runtime environment, including platform (web, desktop, or mobile), operating system, browser (for web and mobile apps), and user interface (Windows or character-based). For example, Dynamic Server Page components can run on many platforms, including Windows, Android and iOS, and in different browsers. Both the OS and the browser used can affect how a DSP widget is rendered.
  • Widget property values in effect at runtime. These are determined by dynamic changes made in script, declarative values set in the component definition, and default values set in initialization files.