]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/radiobut.tex
Added middle mouse event macros to wxListCtrl doc; added wxCreateGreyedImage
[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.}
22\end{twocollist}
a660d684
KB
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\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event,
31when the radiobutton is clicked.}
32\end{twocollist}
33
a660d684
KB
34\wxheading{See also}
35
36\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioBox}{wxradiobox},\rtfsp
37\helpref{wxCheckBox}{wxcheckbox}
38
39\latexignore{\rtfignore{\wxheading{Members}}}
40
41\membersection{wxRadioButton::wxRadioButton}\label{wxradiobuttonconstr}
42
43\func{}{wxRadioButton}{\void}
44
45Default constructor.
46
eaaa6a06 47\func{}{wxRadioButton}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 48\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 49\param{long}{ style = 0},\rtfsp
a660d684
KB
50\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
51\param{const wxString\& }{name = ``radioButton"}}
52
53Constructor, creating and showing a radio button.
54
55\wxheading{Parameters}
56
57\docparam{parent}{Parent window. Must not be NULL.}
58
59\docparam{id}{Window identifier. A value of -1 indicates a default value.}
60
61\docparam{label}{Label for the radio button.}
62
63\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
64
65\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
66
67\docparam{style}{Window style. See \helpref{wxRadioButton}{wxradiobutton}.}
68
69\docparam{validator}{Window validator.}
70
71\docparam{name}{Window name.}
72
73\wxheading{See also}
74
75\helpref{wxRadioButton::Create}{wxradiobuttoncreate}, \helpref{wxValidator}{wxvalidator}
76
77\membersection{wxRadioButton::\destruct{wxRadioButton}}
78
79\func{void}{\destruct{wxRadioButton}}{\void}
80
81Destructor, destroying the radio button item.
82
83\membersection{wxRadioButton::Create}\label{wxradiobuttoncreate}
84
eaaa6a06 85\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
a660d684 86\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
eaaa6a06 87\param{long}{ style = 0},\rtfsp
a660d684
KB
88\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
89\param{const wxString\& }{name = ``radioButton"}}
90
91Creates the choice for two-step construction. See \helpref{wxRadioButton::wxRadioButton}{wxradiobuttonconstr} for
92further details.
93
94\membersection{wxRadioButton::GetValue}\label{wxradiobuttongetvalue}
95
96\constfunc{bool}{GetValue}{\void}
97
98Returns TRUE if the radio button is depressed, FALSE otherwise.
99
100\membersection{wxRadioButton::SetValue}\label{wxradiobuttonsetvalue}
101
102\func{void}{SetValue}{\param{const bool}{ value}}
103
953704c1
RR
104Sets the radio button to selected or deselected status. This does not cause a
105wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event to get emitted.
a660d684
KB
106
107\wxheading{Parameters}
108
109\docparam{value}{TRUE to select, FALSE to deselect.}
110
111