]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/checkbox.tex
wxHTTP::GetResponse() added (patch 794394)
[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
19\twocolwidtha{5cm}
20\begin{twocollist}\itemsep=0pt
21\twocolitem{\windowstyle{wxALIGN\_RIGHT}}{Makes the text appear on the left of the checkbox.}
22\end{twocollist}
23
24See also \helpref{window styles overview}{windowstyles}.
25
26\wxheading{Event handling}
27
28\twocolwidtha{7cm}
29\begin{twocollist}\itemsep=0pt
30\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
31when the checkbox is clicked.}
32\end{twocollist}
33
34\wxheading{See also}
35
36\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
37
38\latexignore{\rtfignore{\wxheading{Members}}}
39
40\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
41
42\func{}{wxCheckBox}{\void}
43
44Default constructor.
45
46\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
47\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
48\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
49\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
50
51Constructor, creating and showing a checkbox.
52
53\wxheading{Parameters}
54
55\docparam{parent}{Parent window. Must not be NULL.}
56
57\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
58
59\docparam{label}{Text to be displayed next to the checkbox.}
60
61\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
62
63\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
64
65\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
66
67\docparam{validator}{Window validator.}
68
69\docparam{name}{Window name.}
70
71\wxheading{See also}
72
73\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
74
75\membersection{wxCheckBox::\destruct{wxCheckBox}}
76
77\func{}{\destruct{wxCheckBox}}{\void}
78
79Destructor, destroying the checkbox.
80
81\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
82
83\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
84\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
85\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
86\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
87
88Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
89for details.
90
91\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
92
93\constfunc{bool}{GetValue}{\void}
94
95Gets the state of the checkbox.
96
97\wxheading{Return value}
98
99Returns {\tt true} if it is checked, {\tt false} otherwise.
100
101\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
102
103\constfunc{bool}{IsChecked}{\void}
104
105This is just a maybe more readable synonym for
106\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns
107{\tt true} if the checkbox is checked and {\tt false} otherwise.
108
109\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
110
111\func{void}{SetValue}{\param{const bool}{ state}}
112
113Sets the checkbox to the given state. This does not cause a
114wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
115
116\wxheading{Parameters}
117
118\docparam{state}{If {\tt true}, the check is on, otherwise it is off.}
119