Properties for Styling the User Interface

Each object that can be viewed in the user interface has a collection of properties that can be used to control what it looks like, and some other aspects of its visual behavior.

Note: User interface objects include widgets, windows, labels, and frames, but their properties may be collectively referred to as widget properties.

The effect of these properties depends on the user interface technology (web, mobile, Windows, or character-based), the component type, the parent object, and the property itself. For example:

  • In applications that run on Windows, the window properties enable you to control the appearance of form and application shell windows.
  • Widget properties in can determine how a field or entity occurrence is displayed, for example, as an edit box, check box, or grid.
  • In web applications, properties can be influenced by CSS. Dynamic server pages provide built-in support for changing these properties dynamically, whereas static server pages do not.
  • Some properties may be inherited from their parent object. 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.

Static and Dynamic Properties

Widget properties may be static or dynamic.

  • The values of static properties cannot be changed after the component has been instantiated.
  • The values of dynamic properties can be changed after instantiation using ProcScript or JavaScript.

Property Values at Runtime

You can set widget properties in several ways—in the initialization file used by the application, In the IDE using the Properties Inspector, or in script. For more information, see Setting Widget Properties.

Uniface relies on object inheritance and a defined order of precedence to ensure that it can apply the appropriate property value at runtime.

To determine the actual property value used, Uniface is guided by the following rules of precedence:

  1. Value set dynamically in ProcScript or JavaScript, for properties that support this.
  2. Value set in ProcScript when the component is instantiated but before it is actually displayed.
  3. Value set declaratively in the Properties Inspector.
  4. If the property can be inherited from a parent object, the value defined for its parent.
  5. Value set in the initialization file.
  6. Default value determined by the technology platform.

Thus, a value set declaratively overrides the default value set in the initialization file, and a value set in ProcScript overrides the declarative value.

Property Names

Each property has a literal (or technical) name that is used when setting or changing its value in script (if the property is dynamic) or initialization files. For example:

$properties(FIELD1) = "backcolor=lightblue"

Technical names may be somewhat cryptic, so more meaningful names are displayed in the Property Inspector (and used in the documentation). For example the literal property clientsyntaxcheck is represented by Syntax Check in Browser.

Property names are not case-sensitive, so Uniface interprets both clientsyntaxcheck and ClientSyntaxCheck as the same property.

Related Topics