]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/checkbox.tex
1. added code to dyntbar to allow bitmap loading from windows resources
[wxWidgets.git] / docs / latex / wx / checkbox.tex
CommitLineData
a660d684
KB
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
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/checkbox.h>
16
a660d684
KB
17\wxheading{Window styles}
18
19There are no special styles for wxCheckBox.
20
21See also \helpref{window styles overview}{windowstyles}.
22
5de76427
JS
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
a660d684
KB
31\wxheading{See also}
32
5de76427 33\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
a660d684
KB
34
35\latexignore{\rtfignore{\wxheading{Members}}}
36
37\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
38
39\func{}{wxCheckBox}{\void}
40
41Default constructor.
42
eaaa6a06 43\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
a660d684
KB
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
eaaa6a06 80\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
a660d684
KB
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 TRUE if it is checked, FALSE otherwise.
97
98\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
99
100\func{void}{SetValue}{\param{const bool}{ state}}
101
102Sets the checkbox to the given state.
103
104\wxheading{Parameters}
105
106\docparam{state}{If TRUE, the check is on, otherwise it is off.}
107
108