class Iup::Radio

A Radio container is used to group toggle controls together, so that only one out of the group will be active at a time.

To use the Radio control, place the toggle controls within a vbox/hbox and add to the radio control.

Example

This example sets up two options: Perl and Ruby. Notice the use of assign_handle in the toggles to provide a meaningful name to the radio group’s current value:

perl = Iup::Toggle.new('Perl') do |t|
  t.assign_handle 'perl'
end

ruby = Iup::Toggle.new('Ruby') do |t|
  t.assign_handle 'ruby'
end

exclusive = Iup::Radio.new(Iup::VBox.new(perl, ruby)) do |r|
  r.value = 'ruby'
end