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