An edit_box is an editable text field optionally preceeded by a
text label. it can be used to get any text input from a user of the
dcl dialog.
A button is a child tile.
related attributes
These attributes are predefined for an edit_box only:
edit_limit
This is an integer attribute that
specifies the number characters allowed in the edit_box.
password_char
If this attribute is specified, the
characters of this edit_box will not be readable, instead the same
character mark will be displayed for each character. This attribute
typically specifies the character to be used as character mark.
However, BricsCAD ignores this character and uses the normal
display of a password field.
This attribute is predefined only for an edit_box or
popup_list:
edit_width
This is an integer attribute that
specifies the width of the edit_box, excluding the width of the
optional label, excluding any additional width the edit_box might
receive during layouting. Mind that for historic reasons this width
does not match the number of characters that can be displayed
inside the edit_box. Rather, it specifies the width of the edit_box
including its (typically sunken) border.
This attribute is predefined only for an image_button, edit_box
or list_box:
When an edit_box has the attribute
allow_accept with value true, hitting enter when the edit_box has
focus will trigger the default button of the dcl dialog.
This attribute is predefined only for a text, text_part,
edit_box, list_box or popup_list:
fixed_width_font
These attributes are predefined for every child tile and
consequently for an edit_box as well:
mnemonic
In general, when the mnemonic of a
child tile is used, the tile will receive focus. However, when
using the mnemonic of an edit_box, the edit_box receives focus AND
all text content gets selected.
is_tab_stop
These attributes are predefined for every tile and consequently
for a button as well:
key
value
The value of an edit_box refers to its
text contents (excluding the optional label).
tooltip
label
Use the label attribute of an edit_box
to display a label control in front of the edit field.
A callback with reason CBR_SELECT will
be sent when hitting enter in an edit_box that has focus.
A callback with reason CBR_LOST_FOCUS
will be sent if an edit_box loses focus. Mind that this event will
not be sent if the focus gets lost by performing a callback in
response to CBR_SELECT. If an edit_box loses focus in response to
hitting enter while it has focus, the CBR_LOST_FOCUS callback will
not be triggered. Rationale: in response to enter, a callback with
reason CBR_SELECT will be triggered so an additional callback is
not needed.
When an edit_box with the allow_accept attribute has
focus, hitting enter will trigger a callback with the ok button as
sender. If no ok button has been defined, done_dialog will be
called. The ok button callback happens in addition to the normal
CBR_SELECT callback of the edit_box.