A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark). Optionally (when the wxCHK_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.
Derived from
wxControl
wxWindow
wxEvtHandler
wxObject
Include files
<wx/checkbox.h>
Window styles
See also window styles overview.
Event handling
EVT_CHECKBOX(id, func) | Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked. |
---|
See also
Default constructor.
Constructor, creating and showing a checkbox.
Parameters
See also
wxCheckBox::Create, wxValidator
Destructor, destroying the checkbox.
Creates the checkbox for two-step construction. See wxCheckBox::wxCheckBox for details.
Gets the state of a 2-state checkbox.
Return value
Returns TRUEif it is checked, FALSEotherwise.
wxCheckBoxState Get3StateValue(void) const
Gets the state of a 3-state checkbox.
Return value
Returns wxCHK_UNCHECKED when the checkbox is unchecked, wxCHK_CHECKED when it is checked and wxCHK_UNDETERMINED when it's in the undetermined state. Asserts when the function is used with a 2-state checkbox.
bool Is3rdStateAllowedForUser(void) const
Returns whether or not the user can set the checkbox to the third state.
Return value
Returns TRUEif the user can set the third state of this checkbox, FALSEif it can only be set programmatically or if it's a 2-state checkbox.
Returns whether or not the checkbox is a 3-state checkbox.
Return value
Returns TRUEif this checkbox is a 3-state checkbox, FALSEif it's a 2-state checkbox.
This is just a maybe more readable synonym for GetValue: just as the latter, it returns TRUEif the checkbox is checked and FALSEotherwise.
Sets the checkbox to the given state. This does not cause a wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
Parameters
Sets the checkbox to the given state. This does not cause a wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
Parameters