1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxRadioButton}}\label{wxradiobutton}
|
|
|
|
|
|
|
|
A radio button item is a button which usually denotes one of several mutually
|
|
|
|
exclusive options. It has a text label next to a (usually) round button.
|
|
|
|
|
2005-02-20 10:57:24 -05:00
|
|
|
You can create a group of mutually-exclusive radio buttons by specifying {\tt wxRB\_GROUP} for
|
|
|
|
the first in the group. The group ends when another radio button group is created, or there are no more radio buttons.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/radiobut.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
1999-07-22 19:28:55 -04:00
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{\windowstyle{wxRB\_GROUP}}{Marks the beginning of a new group of radio buttons.}
|
2005-02-20 10:57:24 -05:00
|
|
|
\twocolitem{\windowstyle{wxRB\_SINGLE}}{In some circumstances, radio buttons that are not
|
|
|
|
consecutive siblings trigger a hang bug in Windows (only). If this happens, add this style
|
|
|
|
to mark the button as not belonging to a group, and implement the mutually-exclusive group behaviour yourself.}
|
|
|
|
\twocolitem{\windowstyle{wxRB\_USE\_CHECKBOX}}{Use a checkbox button instead of radio
|
|
|
|
button (currently supported only on PalmOS).}
|
1999-07-22 19:28:55 -04:00
|
|
|
\end{twocollist}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
1998-08-06 15:42:06 -04:00
|
|
|
\wxheading{Event handling}
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event,
|
|
|
|
when the radiobutton is clicked.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxRadioBox}{wxradiobox},\rtfsp
|
|
|
|
\helpref{wxCheckBox}{wxcheckbox}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-24 06:57:56 -04:00
|
|
|
\membersection{wxRadioButton::wxRadioButton}\label{wxradiobuttonctor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{}{wxRadioButton}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxRadioButton}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
1998-06-14 08:11:50 -04:00
|
|
|
\param{long}{ style = 0},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``radioButton"}}
|
|
|
|
|
|
|
|
Constructor, creating and showing a radio button.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
|
|
|
|
|
|
|
\docparam{label}{Label for the radio button.}
|
|
|
|
|
|
|
|
\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
|
|
|
|
|
|
|
|
\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxRadioButton}{wxradiobutton}.}
|
|
|
|
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxRadioButton::Create}{wxradiobuttoncreate}, \helpref{wxValidator}{wxvalidator}
|
|
|
|
|
2004-09-24 06:57:56 -04:00
|
|
|
\membersection{wxRadioButton::\destruct{wxRadioButton}}\label{wxradiobuttondtor}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\func{void}{\destruct{wxRadioButton}}{\void}
|
|
|
|
|
|
|
|
Destructor, destroying the radio button item.
|
|
|
|
|
|
|
|
\membersection{wxRadioButton::Create}\label{wxradiobuttoncreate}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
1998-06-14 08:11:50 -04:00
|
|
|
\param{long}{ style = 0},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``radioButton"}}
|
|
|
|
|
2004-09-24 06:57:56 -04:00
|
|
|
Creates the choice for two-step construction. See \helpref{wxRadioButton::wxRadioButton}{wxradiobuttonctor} for
|
1998-05-20 10:25:30 -04:00
|
|
|
further details.
|
|
|
|
|
|
|
|
\membersection{wxRadioButton::GetValue}\label{wxradiobuttongetvalue}
|
|
|
|
|
|
|
|
\constfunc{bool}{GetValue}{\void}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if the radio button is depressed, false otherwise.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxRadioButton::SetValue}\label{wxradiobuttonsetvalue}
|
|
|
|
|
|
|
|
\func{void}{SetValue}{\param{const bool}{ value}}
|
|
|
|
|
1999-07-22 19:28:55 -04:00
|
|
|
Sets the radio button to selected or deselected status. This does not cause a
|
|
|
|
wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED event to get emitted.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\docparam{value}{true to select, false to deselect.}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
|