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 program code, using the ui.Form.setElementStyle() method.
The names used to define the STYLE attribute must be a
style-name only, these must not contain the element-type
that is typically used to define the style in a .4st file (as
CheckBox.important for example)
For example, to define a style in a form file for an input
field:
EDIT f001 = customer.fname, STYLE = "info";Several styles can be combined, by using a
space as separator:
EDIT f001 = customer.fname, STYLE = "info important";