Form items / Form item types |
Defines a line-edit with a push-button that can trigger an action.
The BUTTONEDIT form item defines an edit field that get user input, with an additional push button that can fire an action.
This type of form field is typically used to open a secondary window, to let the user choose from a large list of items and set the field value.
The IMAGE attribute of a BUTTONEDIT form item defines the picture to be displayed on the button.
BUTTONEDIT ... IMAGE = "zoom", NOTEDITABLE;
Most of the attributes described in the EDIT item type can also be used with the BUTTONEDIT.
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 ButtonEdit style attributes.
The button of a BUTTONEDIT form element acts as an action view for a dialog action, and is bound to the ON ACTION handler by the ACTION attribute. The ACTION attribute defines the name of the action to be sent to the program when the user clicks on the button. It can be prefixed with a sub-dialog identifier and/or field name, to define a qualified action view:
-- Form file BUTTONEDIT ... ACTION = open_city_list; -- Program file: ON ACTION open_city_list -- Execute code related to the buttonedit button
For more details, see Binding action views to action handlers.
In a grid-based layout, the size of a BUTTONEDIT widget is computed according to layout rules as described in Widget size within hbox tags.
In a stack-based layout, the widget will take the full width available in the parent container.
In grid-based layout, the input length in a BUTTONEDIT fields is defined by the item tag and may need to get the SCROLL attribute. For more details, see Field input length.