Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::RadioButton

class Gtk::RadioButton

Gtk::RadioButton is for a choice from multiple check buttons. A single radio button performs the same basic function as a Gtk::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right.

Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk::RadioButton is one way of giving the user a choice from many options.

Class Methods

Gtk::RadioButton.new(label = nil, use_underline = true)
Creates a new Gtk::RadioButton with a text label. This is for a first radio button, this is same as Gtk::RadioButton.new(nil, label, use_underline).
  • label : the text label to display next to the radio button.
  • use_underline : true if the label will be created underscores in label indicate the mnemonic for radio button.
  • Returns: a new Gtk::RadioButton.
Gtk::RadioButton.new(stock)
Creates a new Gtk::RadioButton with a Gtk::Stock constant value.
Gtk::RadioButton.new(group, label = nil, use_underline = true)
Creates a new Gtk::RadioButton with a text label, adding it to the same group as group.
  • group : a group (Gtk::RadioButton) what you want to make a group.
  • label : the text label to display next to the radio button.
  • use_underline : true if the label will be created underscores in label indicate the mnemonic for radio button.
  • Returns: a new Gtk::RadioButton.
Gtk::RadioButton.new(group, stock)
Creates a new Gtk::RadioButton with a Gtk::Stock constant value., adding it to the same group as group.

Instance Methods

group
Retrieves the group assigned to a radio button. Returns: an array containing all the radio buttons in the same group as radio_button.
group=(group)
Sets a Gtk::RadioButton's group. It should be noted that this does not change the layout of your interface in any way, so if you are changing the group, it is likely you will need to re-arrange the user interface to reflect these changes.
set_group(group)
Same as Gtk::RadioButton#group=.
ref_accessible
See Atk::Implementor#ref_accessible.
add_child
See Gtk::Buildable#add_child.
construct_child
See Gtk::Buildable#construct_child.
get_internal_child
See Gtk::Buildable#get_internal_child.
name
See Gtk::Buildable#name.
name=
See Gtk::Buildable#name=.
set_buildable_property
See Gtk::Buildable#set_buildable_property.
set_name
See Gtk::Buildable#set_name.
builder_name
See Gtk::Buildable#builder_name.
builder_name=
See Gtk::Buildable#builder_name=.
set_builder_name
See Gtk::Buildable#set_builder_name.

Properties

group: Gtk::RadioButton (Write)
The radio button whose group this widget belongs.

See Also

Gtk::OptionMenu: Another way of offering the user a single choice from many.