]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/checkbox.tex
implemented EVT_LIST_CACHE_HINT support: send this message from OnPaint() now
[wxWidgets.git] / docs / latex / wx / checkbox.tex
1 \section{\class{wxCheckBox}}\label{wxcheckbox}
2
3 A checkbox is a labelled box which is either on (checkmark is visible)
4 or 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 There are no special styles for wxCheckBox.
20
21 See 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,
28 when 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
41 Default 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
48 Constructor, 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
76 Destructor, 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
85 Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
86 for details.
87
88 \membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
89
90 \constfunc{bool}{GetValue}{\void}
91
92 Gets the state of the checkbox.
93
94 \wxheading{Return value}
95
96 Returns TRUE if it is checked, FALSE otherwise.
97
98 \membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
99
100 \func{void}{SetValue}{\param{const bool}{ state}}
101
102 Sets the checkbox to the given state. This does not cause a
103 wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
104
105 \wxheading{Parameters}
106
107 \docparam{state}{If TRUE, the check is on, otherwise it is off.}
108
109