A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark). Optionally (when the CHK_3STATE style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a “Does Not Apply” state.
CHK_2STATE |
Create a 2-state checkbox. This is the default. |
CHK_3STATE |
Create a 3-state checkbox.Not implemented in MGL, OS2 and GTK built against GTK+ 1.2. |
CHK_ALLOW_3RD_STATE_FOR_USER |
By default a user can’t set a 3-state checkboxto the third state. It can only be done from code. Using this flags allows the user to set the checkbox to the third state by clicking. |
ALIGN_RIGHT |
Makes the text appear on the left of the checkbox. |
See also window styles overview.
| evt_checkbox(id) { | event | ... } | Process a EVT_COMMAND_CHECKBOX_CLICKED event,when the checkbox is clicked. |
CheckBox.new(Window parent, Integer id, String label,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = 0,
Validator val,
String name = "checkBox")
Constructor, creating and showing a checkbox.
destructor()
Destructor, destroying the checkbox.
Boolean create(Window parent, Integer id, String label,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = 0,
Validator val,
String name = "checkBox")
Creates the checkbox for two-step construction. See CheckBox.new for details.
Boolean get_value()
Gets the state of a 2-state checkbox.
Returns if it is checked, otherwise.
CheckBoxState get_3_state_value()
Gets the state of a 3-state checkbox.
Returns CHK_UNCHECKED when the checkbox is unchecked, CHK_CHECKED when it is checked and CHK_UNDETERMINED when it’s in the undetermined state. Asserts when the function is used with a 2-state checkbox.
Boolean is_3_rd_state_allowed_for_user()
Returns whether or not the user can set the checkbox to the third state.
Returns if the user can set the third state of this checkbox, if it can only be set programmatically or if it’s a 2-state checkbox.
Boolean is_3_state()
Returns whether or not the checkbox is a 3-state checkbox.
Returns if this checkbox is a 3-state checkbox, if it’s a 2-state checkbox.
Boolean is_checked()
This is just a maybe more readable synonym for get_value: just as the latter, it returns if the checkbox is checked and otherwise.
set_value(Boolean state)
Sets the checkbox to the given state. This does not cause a EVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
set_3_state_value(CheckBoxState state)
Sets the checkbox to the given state. This does not cause a EVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
[This page automatically generated from the Textile source at Thu May 01 00:50:34 +0100 2008]