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.
Derived from
wxControl
wxWindow
wxEvtHandler
wxObject
Include files
<wx/radiobut.h>
Window styles
wxRB_GROUP | Marks the beginning of a new group of radio buttons. |
wxRB_SINGLE | If your radio buttons are not consecutive siblings, they cannot form a group under Windows and you should use this style to indicate that each of them is handled individually. |
See also window styles overview.
Event handling
EVT_RADIOBUTTON(id, func) | Process a wxEVT_COMMAND_RADIOBUTTON_SELECTED event, when the radiobutton is clicked. |
See also
Event handling overview, wxRadioBox, wxCheckBox
Members
wxRadioButton::wxRadioButton
wxRadioButton::~wxRadioButton
wxRadioButton::Create
wxRadioButton::GetValue
wxRadioButton::SetValue
wxRadioButton()
Default constructor.
wxRadioButton(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "radioButton")
Constructor, creating and showing a radio button.
Parameters
parent
id
label
pos
size
style
validator
name
See also
wxRadioButton::Create, wxValidator
void ~wxRadioButton()
Destructor, destroying the radio button item.
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "radioButton")
Creates the choice for two-step construction. See wxRadioButton::wxRadioButton for further details.
bool GetValue() const
Returns true if the radio button is depressed, false otherwise.
void SetValue(const bool value)
Sets the radio button to selected or deselected status. This does not cause a wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted.
Parameters
value