]>
git.saurik.com Git - wxWidgets.git/blob - interface/radiobut.h
0fa6d4441cfce5c4321b2e0a03b7535a01927888
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxRadioButton class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 A radio button item is a button which usually denotes one of several mutually
14 exclusive options. It has a text label next to a (usually) round button.
16 You can create a group of mutually-exclusive radio buttons by specifying @c
18 the first in the group. The group ends when another radio button group is
19 created, or there are no more radio buttons.
23 Marks the beginning of a new group of radio buttons.
25 In some circumstances, radio buttons that are not consecutive
26 siblings trigger a hang bug in Windows (only). If this happens, add
27 this style to mark the button as not belonging to a group, and
28 implement the mutually-exclusive group behaviour yourself.
29 @style{wxRB_USE_CHECKBOX}:
30 Use a checkbox button instead of radio button (currently supported
35 @event{EVT_RADIOBUTTON(id, func)}:
36 Process a wxEVT_COMMAND_RADIOBUTTON_SELECTED event, when the
37 radiobutton is clicked.
42 @appearance{radiobutton.png}
45 @ref overview_eventhandlingoverview, wxRadioBox, wxCheckBox
47 class wxRadioButton
: public wxControl
52 Constructor, creating and showing a radio button.
55 Parent window. Must not be @NULL.
57 Window identifier. The value wxID_ANY indicates a default value.
59 Label for the radio button.
61 Window position. If wxDefaultPosition is specified then a default
64 Window size. If wxDefaultSize is specified then a default size
67 Window style. See wxRadioButton.
73 @see Create(), wxValidator
76 wxRadioButton(wxWindow
* parent
, wxWindowID id
,
77 const wxString
& label
,
78 const wxPoint
& pos
= wxDefaultPosition
,
79 const wxSize
& size
= wxDefaultSize
,
81 const wxValidator
& validator
= wxDefaultValidator
,
82 const wxString
& name
= "radioButton");
86 Destructor, destroying the radio button item.
91 Creates the choice for two-step construction. See wxRadioButton() for
94 bool Create(wxWindow
* parent
, wxWindowID id
,
95 const wxString
& label
,
96 const wxPoint
& pos
= wxDefaultPosition
,
97 const wxSize
& size
= wxDefaultSize
,
99 const wxValidator
& validator
= wxDefaultValidator
,
100 const wxString
& name
= "radioButton");
103 Returns @true if the radio button is depressed, @false otherwise.
108 Sets the radio button to selected or deselected status. This does not cause a
109 wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted.
112 @true to select, @false to deselect.
114 void SetValue(const bool value
);