wxRadioButton Class Reference
[Controls]

#include <wx/radiobut.h>

Inheritance diagram for wxRadioButton:

wxControl wxWindow wxEvtHandler wxObject

List of all members.


Detailed Description

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.

You can create a group of mutually-exclusive radio buttons by specifying 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.

Styles:

Events:

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxCommandEvent& event)
Event macros:
Library:  wxCore

Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance

See also:
Event Handling, wxRadioBox, wxCheckBox

Public Member Functions

 wxRadioButton ()
 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=wxRadioButtonNameStr)
virtual ~wxRadioButton ()
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=wxRadioButtonNameStr)
virtual bool GetValue () const
virtual void SetValue (bool value)

Constructor & Destructor Documentation

wxRadioButton::wxRadioButton (  ) 

Default constructor.

See also:
Create(), wxValidator

wxRadioButton::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 = wxRadioButtonNameStr 
)

Constructor, creating and showing a radio button.

Parameters:
parent Parent window. Must not be NULL.
id Window identifier. The value wxID_ANY indicates a default value.
label Label for the radio button.
pos Window position. If wxDefaultPosition is specified then a default position is chosen.
size Window size. If wxDefaultSize is specified then a default size is chosen.
style Window style. See wxRadioButton.
validator Window validator.
name Window name.
See also:
Create(), wxValidator

virtual wxRadioButton::~wxRadioButton (  )  [virtual]

Destructor, destroying the radio button item.


Member Function Documentation

bool wxRadioButton::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 = wxRadioButtonNameStr 
)

Creates the choice for two-step construction. See wxRadioButton() for further details.

virtual bool wxRadioButton::GetValue (  )  const [virtual]

Returns true if the radio button is depressed, false otherwise.

virtual void wxRadioButton::SetValue ( bool  value  )  [virtual]

Sets the radio button to selected or deselected status. This does not cause a wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted.

Parameters:
value true to select, false to deselect.



wxWidgets logo

[ top ]