Form definitions / Toolbars |
A toolbar defines action views presented as a set of buttons that can trigger events in an interactive instruction.
This section describes how to define toolbars with XML in files or in programs as global/default toolbars; it is also possible to define toolbars in forms with the TOOLBAR section, as form-specific toolbars.
Toolbar files can be loaded by a program with the methods ui.Interface.loadToolBar() (for default toolbars) or ui.Form.loadToolBar() (for form-initializers).
A global toolbar is displayed by default in all windows, or in the global window container when using a window container. The form-specific toolbar is displayed in the form where it is defined. The position and visibility of toolbars can be controlled with a window style attribute. Typical "modal windows" do not display toolbars.
The toolbar items (or buttons) are enabled according to the ON ACTION handlers defined by the current interactive instruction. A toolbar item is bound to an action handler by name.. A click on the toolbar button will execute the user code in the action handler.
Toolbar elements can get a style attribute in order to use a specific rendering/decoration following presentation style definitions.
The DOM tag names are case sensitive; Toolbar is different from ToolBar.
When binding to an action, make sure that you are using the right value in the name attribute. As ON ACTION and COMMAND generate lowercase identifiers, it is recommended to use lowercase names.
It is recommended that you define the decoration of toolbar items for common actions with action defaults.