Form items / Form item types |
Defines a push-button that can trigger an action.
The BUTTON form item type defines a standard push button with a label and/or an icon.
The label of a BUTTON form item is defined with the TEXT attribute. The COMMENT attribute can be used to define a hint for the button. Consider using localized strings for these attributes.
BUTTON ... TEXT = %"common.button.text.ok", IMAGE = "accept", COMMENT = %"common.button.hint.ok";
BUTTON form items can inherit action default attributes, to avoid having to specify the TEXT, COMMENT and IMAGE attributes in all elements bound to the same action. For more details, see Configuring actions.
Some front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Common style attributes and Button style attributes.A BUTTON form item acts as an action view for a dialog action, and is bound to the ON ACTION handler by name. The action name can be prefixed with a sub-dialog identifier and/or a field name, to define a qualified action view:
-- Form file (grid layout) BUTTON b1: print; -- Program file: ON ACTION print -- Execute code related to the print action
For more details, see Binding action views to action handlers.