Apply a style to a form item

Styles defined in a style file (4st) can be applied to forms and form items for form previews and style dialogs.

Before you begin:

Identify the style file to use. You may have created your own, you may be using a shared style file with other developers, or you may be relying on a default style file. Understand which file you are using before you start this procedure.


The styleFile property is only used by the Form Designer when previewing the form and for populating Form Designer-related style dialogs. To apply a style file with your Genero application, you must load the style file using the ui.Interface.loadStyles method. See the Genero Business Development Language User Guide for more information regarding the use of style files by Genero applications.

  1. Specify the style file to use.

    You can specify the style file in the form file. Set the styleFile property on the form node.

    1. In the Form Structure view, select the Form node.
    2. In the Properties view, select the styleFile property.
    3. Click the ... button to browse for and select the style file to use.
    If no style file is specified by the styleFile property, a default style file will be used. You can:
    • Put a default.4st in a directory, and add the path to the FGLRESOURCEPATH environment variable of an active environment set. If default.4st is found in the path specified by the FGLRESOURCEPATH environment variable, it will be used.
    • Add a default.4st style file to a node, and set a dependency to the form application node. If you add the default.4st file to a library in your project, and a dependency to this library exists, then the directory is automatically added to FGLRESOURCEPATH.
    • If no default.4st file is found in FGLRESOURCEPATH, $FGLDIR/lib/default.4st is used.
  2. Set the style for each form item.

    You can apply a style to multiple form items at one time. Simply select multiple form items before starting this procedure.

    1. Select the form item.
    2. In the Properties view, select the style property.
    3. Click the ... button.
      The Style Selection dialog displays.
    4. Select a style or styles for the form item.
    5. Select OK.
    Selected styles are listed, separated by a space, in the style property for the form item.