wxRadioButton Class Reference
[Controls]

#include <wx/radiobut.h>

Inheritance diagram for wxRadioButton:
Inheritance graph
[legend]

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

This class supports the following styles:

Events emitted by this class

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

void handlerFuncName(wxCommandEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
See also:
Events and Event Handling, wxRadioBox, wxCheckBox

Public Member Functions

 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=wxRadioButtonNameStr)
 Constructor, creating and showing a radio button.
virtual ~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=wxRadioButtonNameStr)
 Creates the choice for two-step construction.
virtual bool GetValue () const
 Returns true if the radio button is depressed, false otherwise.
virtual void SetValue (bool value)
 Sets the radio button to selected or deselected status.

List of all members.


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.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]