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