wxCheckBoxA 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 Include files <wx/checkbox.h> Window styles
See also window styles overview. Event handling
See also Members
wxCheckBox::wxCheckBox
wxCheckBox::wxCheckBoxwxCheckBox() Default constructor. wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val, const wxString& name = "checkBox") Constructor, creating and showing a checkbox. Parameters parent
id
label
pos
size
style
validator
name
See also wxCheckBox::Create, wxValidator
wxCheckBox::~wxCheckBox~wxCheckBox() Destructor, destroying the checkbox.
wxCheckBox::Createbool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val, const wxString& name = "checkBox") Creates the checkbox for two-step construction. See wxCheckBox::wxCheckBox for details.
wxCheckBox::GetValuebool GetValue() const Gets the state of a 2-state checkbox. Return value Returns true if it is checked, false otherwise.
wxCheckBox::Get3StateValuewxCheckBoxState Get3StateValue() 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.
wxCheckBox::Is3rdStateAllowedForUserbool Is3rdStateAllowedForUser() const Returns whether or not the user can set the checkbox to the third state. Return value Returns true if the user can set the third state of this checkbox, false if it can only be set programmatically or if it's a 2-state checkbox.
wxCheckBox::Is3Statebool Is3State() const Returns whether or not the checkbox is a 3-state checkbox. Return value Returns true if this checkbox is a 3-state checkbox, false if it's a 2-state checkbox.
wxCheckBox::IsCheckedbool IsChecked() const This is just a maybe more readable synonym for GetValue: just as the latter, it returns true if the checkbox is checked and false otherwise.
wxCheckBox::SetValuevoid SetValue(bool state) Sets the checkbox to the given state. This does not cause a wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. Parameters state
wxCheckBox::Set3StateValuevoid Set3StateValue(const wxCheckBoxState state) Sets the checkbox to the given state. This does not cause a wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. Parameters state
|