#include <Wt/WButtonGroup>
Public Member Functions | |
WButtonGroup (WObject *parent=0) | |
Create a new empty button group. | |
~WButtonGroup () | |
Delete a button group. | |
void | addButton (WRadioButton *button) |
Add a radio button to the group. | |
void | addButton (Ext::RadioButton *button) |
Add a radio button to the group. | |
void | removeButton (WRadioButton *button) |
Remove a radio button from the group. | |
void | removeButton (Ext::RadioButton *button) |
Remove a radio button from the group. | |
void | setSelectedButtonIndex (int idx) |
Sets the currently selected radiobutton. | |
int | selectedButtonIndex () const |
Returns the index of the selected radiobutton. | |
WRadioButton * | selectedButton () |
Returns the selected radiobutton. | |
int | count () const |
Returns the number of radiobuttons. |
A button group manages a set of radio buttons , making them exclusive of each other.
Wt::WButtonGroup::~WButtonGroup | ( | ) |
Delete a button group.
This does not delete the radio buttons, but simply removes them from the group.
void Wt::WButtonGroup::setSelectedButtonIndex | ( | int | idx | ) |
Sets the currently selected radiobutton.
Pass the index of the radiobutton to select. -1 will unselect all radiobuttons.
int Wt::WButtonGroup::selectedButtonIndex | ( | ) | const |
Returns the index of the selected radiobutton.
If there is no radiobutton selected this function returns -1.
WRadioButton * Wt::WButtonGroup::selectedButton | ( | ) |
Returns the selected radiobutton.
If there is no radiobutton selected this function returns 0.
int Wt::WButtonGroup::count | ( | ) | const |
Returns the number of radiobuttons.