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