A DCL button is a child tile that represents a normal button with
text content that can be depressed. Such a button can be clicked,
but not double clicked.
related attributes
These attributes are predefined for a button only:
is_cancel
The presence of this attribute makes
this button a cancel button. When a cancel-button or the close
button is clicked, done_dialog is automatically
called, with return code 0. However, if an action attribute is
specified, this action is used instead. See the action attribute
for more. It is recommended to finish every custom action with a
call to "(done_dialog 0)" if the attribute is_cancel is set.
is_default
The presence of this attribute makes
this button an ok button. When an ok-button is clicked, done_dialog is automatically
called, with return code 1. However, if an action attribute is
specified, this action is used instead. See the action attribute
for more. It is recommended to finish every custom action with a
call to "(done_dialog 1)" if the attribute is_default is set.
These attributes are predefined for every child tile and
consequently for a button as well:
mnemonic
In general, when the mnemonic of a
child tile is used, the tile will receive focus. However, when
using the unique mnemonic of a button, the button receives focus
AND the button is activated. If the mnemonic is shared among
multiple tiles, using the mnemonic cycles focus but it will not
activate a button.
is_tab_stop
These attributes are predefined for every tile and consequently
for a button as well:
key
value
Setting the value of a button does not
make sense.
tooltip
label
Use the label attribute of a button to
set the text displayed inside the button.
A callback with reason CBR_SELECT is triggered when the button
is activated. A button can be activated by clicking it, by hitting
enter while the button has focus or by using its unique mnemonic. A
button with the attribute is_cancel can also be activated by using
the close button of a dialog or by hitting escape. A button with
the attribute is_default can also be activated by an edit_box,
list_box or image_button with the allow_accept attribute or by
other active tiles that do not support allow_accept.