]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/radiobox.tex
Added wxRegion version of wxWindowDC::SetClippingRegion
[wxWidgets.git] / docs / latex / wx / radiobox.tex
CommitLineData
a660d684
KB
1\section{\class{wxRadioBox}}\label{wxradiobox}
2
3A radio box item is used to select one of number of mutually exclusive
4choices. It is displayed as a vertical column or horizontal row of
5labelled buttons.
6
7\wxheading{Derived from}
8
9\helpref{wxControl}{wxcontrol}\\
10\helpref{wxWindow}{wxwindow}\\
11\helpref{wxEvtHandler}{wxevthandler}\\
12\helpref{wxObject}{wxobject}
13
14\wxheading{Window styles}
15
16\twocolwidtha{5cm}
17\begin{twocollist}\itemsep=0pt
18\twocolitem{\windowstyle{wxRA\_HORIZONTAL}}{Lays the radiobox out in rows.}
19\twocolitem{\windowstyle{wxRA\_VERTICAL}}{Lays the radiobox out in columns.}
20\end{twocollist}
21
22See also \helpref{window styles overview}{windowstyles}.
23
5de76427
JS
24\wxheading{Event handling}
25
26\twocolwidtha{7cm}
27\begin{twocollist}\itemsep=0pt
28\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED event,
29when a radiobutton is clicked.}
30\end{twocollist}
31
a660d684
KB
32\wxheading{See also}
33
34\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioButton}{wxradiobutton},\rtfsp
35\helpref{wxCheckBox}{wxcheckbox}
36
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39\membersection{wxRadioBox::wxRadioBox}\label{wxradioboxconstr}
40
41\func{}{wxRadioBox}{\void}
42
43Default constructor.
44
eaaa6a06 45\func{}{wxRadioBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp
a660d684 46\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06
JS
47\param{int}{ n = 0}, \param{const wxString}{ choices[] = NULL},\rtfsp
48\param{int}{ majorDimension = 0}, \param{long}{ style = wxRA\_HORIZONTAL},\rtfsp
a660d684
KB
49\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
50\param{const wxString\& }{name = ``radioBox"}}
51
52Constructor, creating and showing a radiobox.
53
54\wxheading{Parameters}
55
56\docparam{parent}{Parent window. Must not be NULL.}
57
58\docparam{id}{Window identifier. A value of -1 indicates a default value.}
59
60\docparam{label}{Label for the static box surrounding the radio buttons.}
61
62\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
63
64\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
65
66\docparam{n}{Number of choices with which to initialize the radiobox.}
67
68\docparam{choices}{An array of choices with which to initialize the radiobox.}
69
70\docparam{majorDimension}{Specifies the number of rows (if style is wxRA\_VERTICAL) or columns (if style is wxRA\_HORIZONTAL) for a two-dimensional
71radiobox.}
72
73\docparam{style}{Window style. See \helpref{wxRadioBox}{wxradiobox}.}
74
75\docparam{validator}{Window validator.}
76
77\docparam{name}{Window name.}
78
79\wxheading{See also}
80
81\helpref{wxRadioBox::Create}{wxradioboxcreate}, \helpref{wxValidator}{wxvalidator}
82
83\membersection{wxRadioBox::\destruct{wxRadioBox}}
84
85\func{}{\destruct{wxRadioBox}}{\void}
86
87Destructor, destroying the radiobox item.
88
89\membersection{wxRadioBox::Create}\label{wxradioboxcreate}
90
eaaa6a06 91\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp
a660d684 92\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06
JS
93\param{int}{ n = 0}, \param{const wxString}{ choices[] = NULL},\rtfsp
94\param{int}{ majorDimension = 0}, \param{long}{ style = wxRA\_HORIZONTAL},\rtfsp
a660d684
KB
95\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
96\param{const wxString\& }{name = ``radioBox"}}
97
98Creates the radiobox for two-step construction. See \helpref{wxRadioBox::wxRadioBox}{wxradioboxconstr}\rtfsp
99for further details.
100
101\membersection{wxRadioBox::Enable}\label{wxradioboxenable}
102
103\func{void}{Enable}{\param{const bool}{ enable}}
104
105Enables or disables the entire radiobox.
106
eaaa6a06 107\func{void}{Enable}{\param{int}{ n}, \param{const bool}{ enable}}
a660d684
KB
108
109Enables or disables an individual button in the radiobox.
110
111\wxheading{Parameters}
112
113\docparam{enable}{TRUE to enable, FALSE to disable.}
114
115\docparam{n}{The zero-based button to enable or disable.}
116
117\membersection{wxRadioBox::FindString}\label{wxradioboxfindstring}
118
119\constfunc{int}{FindString}{\param{const wxString\& }{string}}
120
121Finds a button matching the given string, returning the position if found, or
122-1 if not found.
123
124\wxheading{Parameters}
125
126\docparam{string}{The string to find.}
127
128\membersection{wxRadioBox::GetLabel}\label{wxradioboxgetlabel}
129
130\constfunc{wxString}{GetLabel}{\void}
131
132Returns the radiobox label.
133
eaaa6a06 134\constfunc{wxString}{GetLabel}{\param{int }{n}}
a660d684
KB
135
136Returns the label for the given button.
137
138\wxheading{Parameters}
139
140\docparam{n}{The zero-based button index.}
141
142\wxheading{See also}
143
144\helpref{wxRadioBox::SetLabel}{wxradioboxsetlabel}
145
146\membersection{wxRadioBox::GetSelection}\label{wxradioboxgetselection}
147
148\constfunc{int}{GetSelection}{\void}
149
150Returns the zero-based position of the selected button.
151
152\membersection{wxRadioBox::GetStringSelection}\label{wxradioboxgetstringselection}
153
154\constfunc{wxString}{GetStringSelection}{\void}
155
156Returns the selected string.
157
158\membersection{wxRadioBox::Number}\label{wxradioboxnumber}
159
160\constfunc{int}{Number}{\void}
161
162Returns the number of buttons in the radiobox.
163
164\membersection{wxRadioBox::SetLabel}\label{wxradioboxsetlabel}
165
166\func{void}{SetLabel}{\param{const wxString\&}{ label}}
167
168Sets the radiobox label.
169
eaaa6a06 170\func{void}{SetLabel}{\param{int }{n}, \param{const wxString\&}{ label}}
a660d684
KB
171
172Sets a label for a radio button.
173
174\wxheading{Parameters}
175
176\docparam{label}{The label to set.}
177
178\docparam{n}{The zero-based button index.}
179
180\membersection{wxRadioBox::SetSelection}\label{wxradioboxsetselection}
181
eaaa6a06 182\func{void}{SetSelection}{\param{int}{ n}}
a660d684
KB
183
184Sets a button by passing the desired string position.
185
186\wxheading{Parameters}
187
188\docparam{n}{The zero-based button position.}
189
190\membersection{wxRadioBox::SetStringSelection}\label{wxradioboxsetstringselection}
191
192\func{void}{SetStringSelection}{\param{const wxString\& }{string}}
193
194Sets a button by passing the desired string.
195
196\wxheading{Parameters}
197
198\docparam{string}{The label of the button to select.}
199
200\membersection{wxRadioBox::Show}\label{wxradioboxshow}
201
202\func{void}{Show}{\param{const bool}{ show}}
203
204Shows or hides the entire radiobox.
205
eaaa6a06 206\func{void}{Show}{\param{int }{item}, \param{const bool}{ show}}
a660d684
KB
207
208Shows or hides individual buttons.
209
210\wxheading{Parameters}
211
212\docparam{show}{TRUE to show, FALSE to hide.}
213
214\docparam{item}{The zero-based position of the button to show or hide.}
215
216\membersection{wxRadioBox::GetString}\label{wxradioboxgetstring}
217
eaaa6a06 218\constfunc{wxString}{GetString}{\param{int}{ n}}
a660d684
KB
219
220Returns the label for the button at the given position.
221
222\wxheading{Parameters}
223
224\docparam{n}{The zero-based button position.}
225
226