1 \section{\class{wxRadioButton
}}\label{wxradiobutton
}
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.
6 \wxheading{Derived from
}
8 \helpref{wxControl
}{wxcontrol
}\\
9 \helpref{wxWindow
}{wxwindow
}\\
10 \helpref{wxEvtHandler
}{wxevthandler
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include files
}
17 \wxheading{Window styles
}
20 \begin{twocollist
}\itemsep=
0pt
21 \twocolitem{\windowstyle{wxRB
\_GROUP}}{Marks the beginning of a new group of radio buttons.
}
22 \twocolitem{\windowstyle{wxRB
\_SINGLE}}{If your radio buttons are not
23 consecutive siblings, they cannot form a group under Windows and you should use
24 this style to indicate that each of them is handled individually.
}
27 See also
\helpref{window styles overview
}{windowstyles
}.
29 \wxheading{Event handling
}
32 \begin{twocollist
}\itemsep=
0pt
33 \twocolitem{{\bf EVT
\_RADIOBUTTON(id, func)
}}{Process a wxEVT
\_COMMAND\_RADIOBUTTON\_SELECTED event,
34 when the radiobutton is clicked.
}
39 \helpref{Event handling overview
}{eventhandlingoverview
},
\helpref{wxRadioBox
}{wxradiobox
},
\rtfsp
40 \helpref{wxCheckBox
}{wxcheckbox
}
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxRadioButton::wxRadioButton
}\label{wxradiobuttonconstr
}
46 \func{}{wxRadioButton
}{\void}
50 \func{}{wxRadioButton
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\param{const wxString\&
}{label
},
\rtfsp
51 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
\rtfsp
52 \param{long
}{ style =
0},
\rtfsp
53 \param{const wxValidator\&
}{validator = wxDefaultValidator
},
\rtfsp
54 \param{const wxString\&
}{name = ``radioButton"
}}
56 Constructor, creating and showing a radio button.
58 \wxheading{Parameters
}
60 \docparam{parent
}{Parent window. Must not be NULL.
}
62 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
64 \docparam{label
}{Label for the radio button.
}
66 \docparam{pos
}{Window position. If the position (-
1, -
1) is specified then a default position is chosen.
}
68 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then a default size is chosen.
}
70 \docparam{style
}{Window style. See
\helpref{wxRadioButton
}{wxradiobutton
}.
}
72 \docparam{validator
}{Window validator.
}
74 \docparam{name
}{Window name.
}
78 \helpref{wxRadioButton::Create
}{wxradiobuttoncreate
},
\helpref{wxValidator
}{wxvalidator
}
80 \membersection{wxRadioButton::
\destruct{wxRadioButton
}}
82 \func{void
}{\destruct{wxRadioButton
}}{\void}
84 Destructor, destroying the radio button item.
86 \membersection{wxRadioButton::Create
}\label{wxradiobuttoncreate
}
88 \func{bool
}{Create
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{ id
},
\param{const wxString\&
}{label
},
\rtfsp
89 \param{const wxPoint\&
}{pos = wxDefaultPosition
},
\param{const wxSize\&
}{ size = wxDefaultSize
},
\rtfsp
90 \param{long
}{ style =
0},
\rtfsp
91 \param{const wxValidator\&
}{validator = wxDefaultValidator
},
\rtfsp
92 \param{const wxString\&
}{name = ``radioButton"
}}
94 Creates the choice for two-step construction. See
\helpref{wxRadioButton::wxRadioButton
}{wxradiobuttonconstr
} for
97 \membersection{wxRadioButton::GetValue
}\label{wxradiobuttongetvalue
}
99 \constfunc{bool
}{GetValue
}{\void}
101 Returns true if the radio button is depressed, false otherwise.
103 \membersection{wxRadioButton::SetValue
}\label{wxradiobuttonsetvalue
}
105 \func{void
}{SetValue
}{\param{const bool
}{ value
}}
107 Sets the radio button to selected or deselected status. This does not cause a
108 wxEVT
\_COMMAND\_RADIOBUTTON\_SELECTED event to get emitted.
110 \wxheading{Parameters
}
112 \docparam{value
}{true to select, false to deselect.
}