1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxCheckBox}}\label{wxcheckbox}
|
|
|
|
|
|
|
|
A checkbox is a labelled box which is either on (checkmark is visible)
|
|
|
|
or off (no checkmark).
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/checkbox.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
There are no special styles for wxCheckBox.
|
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
1998-08-06 15:42:06 -04:00
|
|
|
\wxheading{Event handling}
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
|
|
|
|
when the checkbox is clicked.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
1998-08-06 15:42:06 -04:00
|
|
|
\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
|
|
|
|
|
|
|
|
\func{}{wxCheckBox}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
|
|
|
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
|
|
|
|
|
|
|
Constructor, creating and showing a checkbox.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
|
|
|
|
|
|
|
|
\docparam{label}{Text to be displayed next to the checkbox.}
|
|
|
|
|
|
|
|
\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
|
|
|
|
|
|
|
|
\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
|
|
|
|
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
|
|
|
|
|
|
|
|
\membersection{wxCheckBox::\destruct{wxCheckBox}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxCheckBox}}{\void}
|
|
|
|
|
|
|
|
Destructor, destroying the checkbox.
|
|
|
|
|
|
|
|
\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
|
|
|
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
|
|
|
|
|
|
|
Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
|
|
|
|
for details.
|
|
|
|
|
|
|
|
\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
|
|
|
|
|
|
|
|
\constfunc{bool}{GetValue}{\void}
|
|
|
|
|
|
|
|
Gets the state of the checkbox.
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
Returns TRUE if it is checked, FALSE otherwise.
|
|
|
|
|
|
|
|
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
|
|
|
|
|
|
|
|
\func{void}{SetValue}{\param{const bool}{ state}}
|
|
|
|
|
|
|
|
Sets the checkbox to the given state.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{state}{If TRUE, the check is on, otherwise it is off.}
|
|
|
|
|
|
|
|
|