新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gtk::RadioButton

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 it's 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.

インクルードされているモジュール

  • Gtk::Buildable?
  • Atk::Implementor
  • GLib::Interface?

クラスメソッド

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.

インスタンスメソッド

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=.

プロパティ

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

関連ページ

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

更新履歴

  • 2014-06-16 クラスのメンバで漏れていたものを追加。 - きたがわ
  • - Masao?