Wt::WButtonGroup Class Reference

A class for grouping radio buttons logically together. More...

#include <Wt/WButtonGroup>

Inheritance diagram for Wt::WButtonGroup:

Inheritance graph
[legend]

List of all members.

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.
WRadioButtonselectedButton ()
 Returns the selected radiobutton.


Detailed Description

A class for grouping radio buttons logically together.

A button group manages a set of radio buttons , making them exclusive of each other.


Constructor & Destructor Documentation

Wt::WButtonGroup::~WButtonGroup (  ) 

Delete a button group.

This does not delete the radio buttons, but simply removes them from the group.


Member Function Documentation

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.


Generated on Fri Sep 12 17:01:14 2008 for Wt by doxygen 1.5.6