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{Include files
}
17 \wxheading{Window styles
}
19 There are no special styles for wxCheckBox.
21 See also
\helpref{window styles overview
}{windowstyles
}.
23 \wxheading{Event handling
}
26 \begin{twocollist
}\itemsep=
0pt
27 \twocolitem{{\bf EVT
\_CHECKBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_CHECKBOX\_CLICKED event,
28 when the checkbox is clicked.
}
33 \helpref{wxRadioButton
}{wxradiobutton
},
\helpref{wxCommandEvent
}{wxcommandevent
}
35 \latexignore{\rtfignore{\wxheading{Members
}}}
37 \membersection{wxCheckBox::wxCheckBox
}\label{wxcheckboxconstr
}
39 \func{}{wxCheckBox
}{\void}
43 \func{}{wxCheckBox
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{ id
},
\rtfsp
44 \param{const wxString\&
}{label
},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
45 \param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{ style =
0},
\rtfsp
46 \param{const wxValidator\&
}{val
},
\param{const wxString\&
}{name = ``checkBox"
}}
48 Constructor, creating and showing a checkbox.
50 \wxheading{Parameters
}
52 \docparam{parent
}{Parent window. Must not be NULL.
}
54 \docparam{id
}{Checkbox identifier. A value of -
1 indicates a default value.
}
56 \docparam{label
}{Text to be displayed next to the checkbox.
}
58 \docparam{pos
}{Checkbox position. If the position (-
1, -
1) is specified then a default position is chosen.
}
60 \docparam{size
}{Checkbox size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
62 \docparam{style
}{Window style. See
\helpref{wxCheckBox
}{wxcheckbox
}.
}
64 \docparam{validator
}{Window validator.
}
66 \docparam{name
}{Window name.
}
70 \helpref{wxCheckBox::Create
}{wxcheckboxcreate
},
\helpref{wxValidator
}{wxvalidator
}
72 \membersection{wxCheckBox::
\destruct{wxCheckBox
}}
74 \func{}{\destruct{wxCheckBox
}}{\void}
76 Destructor, destroying the checkbox.
78 \membersection{wxCheckBox::Create
}\label{wxcheckboxcreate
}
80 \func{bool
}{Create
}{\param{wxWindow*
}{parent
},
\param{wxWindowID
}{ id
},
\rtfsp
81 \param{const wxString\&
}{label
},
\param{const wxPoint\&
}{pos = wxDefaultPosition
},
\rtfsp
82 \param{const wxSize\&
}{size = wxDefaultSize
},
\param{long
}{ style =
0},
\rtfsp
83 \param{const wxValidator\&
}{val
},
\param{const wxString\&
}{name = ``checkBox"
}}
85 Creates the checkbox for two-step construction. See
\helpref{wxCheckBox::wxCheckBox
}{wxcheckboxconstr
}\rtfsp
88 \membersection{wxCheckBox::GetValue
}\label{wxcheckboxgetvalue
}
90 \constfunc{bool
}{GetValue
}{\void}
92 Gets the state of the checkbox.
94 \wxheading{Return value
}
96 Returns
{\tt TRUE
} if it is checked,
{\tt FALSE
} otherwise.
98 \membersection{wxCheckBox::IsChecked
}\label{wxcheckboxischecked
}
100 \constfunc{bool
}{IsChecked
}{\void}
102 This is just a maybe more readable synonym for
103 \helpref{GetValue
}{wxcheckboxgetvalue
}: just as the latter, it returns
104 {\tt TRUE
} if the checkbox is checked and
{\tt FALSE
} otherwise.
106 \membersection{wxCheckBox::SetValue
}\label{wxcheckboxsetvalue
}
108 \func{void
}{SetValue
}{\param{const bool
}{ state
}}
110 Sets the checkbox to the given state. This does not cause a
111 wxEVT
\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
113 \wxheading{Parameters
}
115 \docparam{state
}{If
{\tt TRUE|, the check is on, otherwise it is off.
}