1 \section{\class{wxCheckBox
}}\label{wxcheckbox
}
3 A checkbox is a labelled box which is either on (checkmark is visible)
6 \wxheading{Derived from
}
8 \helpref{wxControl
}{wxcontrol
}\\
9 \helpref{wxWindow
}{wxwindow
}\\
10 \helpref{wxEvtHandler
}{wxevthandler
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Window styles
}
15 There are no special styles for wxCheckBox.
17 See also
\helpref{window styles overview
}{windowstyles
}.
19 \wxheading{Event handling
}
22 \begin{twocollist
}\itemsep=
0pt
23 \twocolitem{{\bf EVT
\_CHECKBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_CHECKBOX\_CLICKED event,
24 when the checkbox is clicked.
}
29 \helpref{wxRadioButton
}{wxradiobutton
},
\helpref{wxCommandEvent
}{wxcommandevent
}
31 \latexignore{\rtfignore{\wxheading{Members
}}}
33 \membersection{wxCheckBox::wxCheckBox
}\label{wxcheckboxconstr
}
35 \func{}{wxCheckBox
}{\void}
39 \func{}{wxCheckBox
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{ id
},
\rtfsp
40 \param{const wxString\&
}{label
},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
41 \param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{ style =
0},
\rtfsp
42 \param{const wxValidator\&
}{val
},
\param{const wxString\&
}{name = ``checkBox"
}}
44 Constructor, creating and showing a checkbox.
46 \wxheading{Parameters
}
48 \docparam{parent
}{Parent window. Must not be NULL.
}
50 \docparam{id
}{Checkbox identifier. A value of -
1 indicates a default value.
}
52 \docparam{label
}{Text to be displayed next to the checkbox.
}
54 \docparam{pos
}{Checkbox position. If the position (-
1, -
1) is specified then a default position is chosen.
}
56 \docparam{size
}{Checkbox size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
58 \docparam{style
}{Window style. See
\helpref{wxCheckBox
}{wxcheckbox
}.
}
60 \docparam{validator
}{Window validator.
}
62 \docparam{name
}{Window name.
}
66 \helpref{wxCheckBox::Create
}{wxcheckboxcreate
},
\helpref{wxValidator
}{wxvalidator
}
68 \membersection{wxCheckBox::
\destruct{wxCheckBox
}}
70 \func{}{\destruct{wxCheckBox
}}{\void}
72 Destructor, destroying the checkbox.
74 \membersection{wxCheckBox::Create
}\label{wxcheckboxcreate
}
76 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{ id
},
\rtfsp
77 \param{const wxString\&
}{label
},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
78 \param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{ style =
0},
\rtfsp
79 \param{const wxValidator\&
}{val
},
\param{const wxString\&
}{name = ``checkBox"
}}
81 Creates the checkbox for two-step construction. See
\helpref{wxCheckBox::wxCheckBox
}{wxcheckboxconstr
}\rtfsp
84 \membersection{wxCheckBox::GetValue
}\label{wxcheckboxgetvalue
}
86 \constfunc{bool
}{GetValue
}{\void}
88 Gets the state of the checkbox.
90 \wxheading{Return value
}
92 Returns TRUE if it is checked, FALSE otherwise.
94 \membersection{wxCheckBox::SetValue
}\label{wxcheckboxsetvalue
}
96 \func{void
}{SetValue
}{\param{const bool
}{ state
}}
98 Sets the checkbox to the given state.
100 \wxheading{Parameters
}
102 \docparam{state
}{If TRUE, the check is on, otherwise it is off.
}