Using a style
To apply a specific style, set the style-name in the
style attribute of the node representing the graphical element in the abstract user
interface tree.
There are different ways to set the style attribute of an element:
- As a form element attribute, with a
STYLEattribute in the form specification file. - In the
ATTRIBUTESclause of instructions such asOPEN WINDOW,MESSAGE,ERROR. - Dynamically by a program, using the ui.Form.setElementStyle() method.
For example, to define a style in a form file for an input
field:
EDIT f001 = customer.fname, STYLE = "info";Note: The string used to define the
STYLE attribute must be a
style-name only, it must not contain the element-type that is
typically used to define the style in a .4st file (as
CheckBox.important for example)