]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/radiobut.tex
wxHSCROLL works in GTK2, changed description to indicate no effect only on wxGTK1
[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
6\wxheading{Derived from}
7
8\helpref{wxControl}{wxcontrol}\\
9\helpref{wxWindow}{wxwindow}\\
10\helpref{wxEvtHandler}{wxevthandler}\\
11\helpref{wxObject}{wxobject}
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/radiobut.h>
16
a660d684
KB
17\wxheading{Window styles}
18
953704c1
RR
19\twocolwidtha{5cm}
20\begin{twocollist}\itemsep=0pt
21\twocolitem{\windowstyle{wxRB\_GROUP}}{Marks the beginning of a new group of radio buttons.}
2b5f62a0
VZ
22\twocolitem{\windowstyle{wxRB\_SINGLE}}{If your radio buttons are not
23consecutive siblings, they cannot form a group under Windows and you should use
24this style to indicate that each of them is handled individually.}
953704c1 25\end{twocollist}
a660d684
KB
26
27See also \helpref{window styles overview}{windowstyles}.
28
5de76427
JS
29\wxheading{Event handling}
30
31\twocolwidtha{7cm}
32\begin{twocollist}\itemsep=0pt
33\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event,
34when the radiobutton is clicked.}
35\end{twocollist}
36
a660d684
KB
37\wxheading{See also}
38
39\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioBox}{wxradiobox},\rtfsp
40\helpref{wxCheckBox}{wxcheckbox}
41
42\latexignore{\rtfignore{\wxheading{Members}}}
43
39275175 44\membersection{wxRadioButton::wxRadioButton}\label{wxradiobuttonctor}
a660d684
KB
45
46\func{}{wxRadioButton}{\void}
47
48Default constructor.
49
eaaa6a06 50\func{}{wxRadioButton}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 51\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 52\param{long}{ style = 0},\rtfsp
a660d684
KB
53\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
54\param{const wxString\& }{name = ``radioButton"}}
55
56Constructor, creating and showing a radio button.
57
58\wxheading{Parameters}
59
60\docparam{parent}{Parent window. Must not be NULL.}
61
62\docparam{id}{Window identifier. A value of -1 indicates a default value.}
63
64\docparam{label}{Label for the radio button.}
65
66\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
67
68\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
69
70\docparam{style}{Window style. See \helpref{wxRadioButton}{wxradiobutton}.}
71
72\docparam{validator}{Window validator.}
73
74\docparam{name}{Window name.}
75
76\wxheading{See also}
77
78\helpref{wxRadioButton::Create}{wxradiobuttoncreate}, \helpref{wxValidator}{wxvalidator}
79
39275175 80\membersection{wxRadioButton::\destruct{wxRadioButton}}\label{wxradiobuttondtor}
a660d684
KB
81
82\func{void}{\destruct{wxRadioButton}}{\void}
83
84Destructor, destroying the radio button item.
85
86\membersection{wxRadioButton::Create}\label{wxradiobuttoncreate}
87
eaaa6a06 88\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 89\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 90\param{long}{ style = 0},\rtfsp
a660d684
KB
91\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
92\param{const wxString\& }{name = ``radioButton"}}
93
39275175 94Creates the choice for two-step construction. See \helpref{wxRadioButton::wxRadioButton}{wxradiobuttonctor} for
a660d684
KB
95further details.
96
97\membersection{wxRadioButton::GetValue}\label{wxradiobuttongetvalue}
98
99\constfunc{bool}{GetValue}{\void}
100
cc81d32f 101Returns true if the radio button is depressed, false otherwise.
a660d684
KB
102
103\membersection{wxRadioButton::SetValue}\label{wxradiobuttonsetvalue}
104
105\func{void}{SetValue}{\param{const bool}{ value}}
106
953704c1
RR
107Sets the radio button to selected or deselected status. This does not cause a
108wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event to get emitted.
a660d684
KB
109
110\wxheading{Parameters}
111
cc81d32f 112\docparam{value}{true to select, false to deselect.}
a660d684
KB
113
114