]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/checkbox.tex
allow to change the event propagation level (modified patch 743086)
[wxWidgets.git] / docs / latex / wx / checkbox.tex
... / ...
CommitLineData
1\section{\class{wxCheckBox}}\label{wxcheckbox}
2
3A checkbox is a labelled box which is either on (checkmark is visible)
4or off (no checkmark).
5
6\wxheading{Derived from}
7
8\helpref{wxControl}{wxcontrol}\\
9\helpref{wxWindow}{wxwindow}\\
10\helpref{wxEvtHandler}{wxevthandler}\\
11\helpref{wxObject}{wxobject}
12
13\wxheading{Include files}
14
15<wx/checkbox.h>
16
17\wxheading{Window styles}
18
19There are no special styles for wxCheckBox.
20
21See also \helpref{window styles overview}{windowstyles}.
22
23\wxheading{Event handling}
24
25\twocolwidtha{7cm}
26\begin{twocollist}\itemsep=0pt
27\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
28when the checkbox is clicked.}
29\end{twocollist}
30
31\wxheading{See also}
32
33\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
34
35\latexignore{\rtfignore{\wxheading{Members}}}
36
37\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
38
39\func{}{wxCheckBox}{\void}
40
41Default constructor.
42
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"}}
47
48Constructor, creating and showing a checkbox.
49
50\wxheading{Parameters}
51
52\docparam{parent}{Parent window. Must not be NULL.}
53
54\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
55
56\docparam{label}{Text to be displayed next to the checkbox.}
57
58\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
59
60\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
61
62\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
63
64\docparam{validator}{Window validator.}
65
66\docparam{name}{Window name.}
67
68\wxheading{See also}
69
70\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
71
72\membersection{wxCheckBox::\destruct{wxCheckBox}}
73
74\func{}{\destruct{wxCheckBox}}{\void}
75
76Destructor, destroying the checkbox.
77
78\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
79
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"}}
84
85Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
86for details.
87
88\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
89
90\constfunc{bool}{GetValue}{\void}
91
92Gets the state of the checkbox.
93
94\wxheading{Return value}
95
96Returns {\tt true} if it is checked, {\tt false} otherwise.
97
98\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
99
100\constfunc{bool}{IsChecked}{\void}
101
102This 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.
105
106\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
107
108\func{void}{SetValue}{\param{const bool}{ state}}
109
110Sets the checkbox to the given state. This does not cause a
111wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
112
113\wxheading{Parameters}
114
115\docparam{state}{If {\tt true}, the check is on, otherwise it is off.}
116