]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/radiobut.tex
corrected typo in the creation date
[wxWidgets.git] / docs / latex / wx / radiobut.tex
CommitLineData
a660d684
KB
1\section{\class{wxRadioButton}}\label{wxradiobutton}
2
3A radio button item is a button which usually denotes one of several mutually
4exclusive options. It has a text label next to a (usually) round button.
5
dbfb85a7
JS
6You can create a group of mutually-exclusive radio buttons by specifying {\tt wxRB\_GROUP} for
7the first in the group. The group ends when another radio button group is created, or there are no more radio buttons.
8
a660d684
KB
9\wxheading{Derived from}
10
11\helpref{wxControl}{wxcontrol}\\
12\helpref{wxWindow}{wxwindow}\\
13\helpref{wxEvtHandler}{wxevthandler}\\
14\helpref{wxObject}{wxobject}
15
954b8ae6
JS
16\wxheading{Include files}
17
18<wx/radiobut.h>
19
a660d684
KB
20\wxheading{Window styles}
21
953704c1
RR
22\twocolwidtha{5cm}
23\begin{twocollist}\itemsep=0pt
24\twocolitem{\windowstyle{wxRB\_GROUP}}{Marks the beginning of a new group of radio buttons.}
dbfb85a7
JS
25\twocolitem{\windowstyle{wxRB\_SINGLE}}{In some circumstances, radio buttons that are not
26consecutive siblings trigger a hang bug in Windows (only). If this happens, add this style
27to mark the button as not belonging to a group, and implement the mutually-exclusive group behaviour yourself.}
28\twocolitem{\windowstyle{wxRB\_USE\_CHECKBOX}}{Use a checkbox button instead of radio
29button (currently supported only on PalmOS).}
953704c1 30\end{twocollist}
a660d684
KB
31
32See also \helpref{window styles overview}{windowstyles}.
33
5de76427
JS
34\wxheading{Event handling}
35
36\twocolwidtha{7cm}
37\begin{twocollist}\itemsep=0pt
38\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event,
39when the radiobutton is clicked.}
40\end{twocollist}
41
a660d684
KB
42\wxheading{See also}
43
44\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioBox}{wxradiobox},\rtfsp
45\helpref{wxCheckBox}{wxcheckbox}
46
47\latexignore{\rtfignore{\wxheading{Members}}}
48
39275175 49\membersection{wxRadioButton::wxRadioButton}\label{wxradiobuttonctor}
a660d684
KB
50
51\func{}{wxRadioButton}{\void}
52
53Default constructor.
54
eaaa6a06 55\func{}{wxRadioButton}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 56\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 57\param{long}{ style = 0},\rtfsp
a660d684
KB
58\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
59\param{const wxString\& }{name = ``radioButton"}}
60
61Constructor, creating and showing a radio button.
62
63\wxheading{Parameters}
64
65\docparam{parent}{Parent window. Must not be NULL.}
66
67\docparam{id}{Window identifier. A value of -1 indicates a default value.}
68
69\docparam{label}{Label for the radio button.}
70
71\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
72
73\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
74
75\docparam{style}{Window style. See \helpref{wxRadioButton}{wxradiobutton}.}
76
77\docparam{validator}{Window validator.}
78
79\docparam{name}{Window name.}
80
81\wxheading{See also}
82
83\helpref{wxRadioButton::Create}{wxradiobuttoncreate}, \helpref{wxValidator}{wxvalidator}
84
39275175 85\membersection{wxRadioButton::\destruct{wxRadioButton}}\label{wxradiobuttondtor}
a660d684
KB
86
87\func{void}{\destruct{wxRadioButton}}{\void}
88
89Destructor, destroying the radio button item.
90
91\membersection{wxRadioButton::Create}\label{wxradiobuttoncreate}
92
eaaa6a06 93\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 94\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 95\param{long}{ style = 0},\rtfsp
a660d684
KB
96\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
97\param{const wxString\& }{name = ``radioButton"}}
98
39275175 99Creates the choice for two-step construction. See \helpref{wxRadioButton::wxRadioButton}{wxradiobuttonctor} for
a660d684
KB
100further details.
101
102\membersection{wxRadioButton::GetValue}\label{wxradiobuttongetvalue}
103
104\constfunc{bool}{GetValue}{\void}
105
cc81d32f 106Returns true if the radio button is depressed, false otherwise.
a660d684
KB
107
108\membersection{wxRadioButton::SetValue}\label{wxradiobuttonsetvalue}
109
110\func{void}{SetValue}{\param{const bool}{ value}}
111
953704c1
RR
112Sets the radio button to selected or deselected status. This does not cause a
113wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event to get emitted.
a660d684
KB
114
115\wxheading{Parameters}
116
cc81d32f 117\docparam{value}{true to select, false to deselect.}
a660d684
KB
118
119