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, which is the child widget.

Attributes

clientoffset

read-only, returns current offset of frame in its client as “widthxheight”.

clientsize

read-only, returns current size of frame as “widthxheight”.

expand

Allows container to fill available space in indicated direction. Values 'no' / 'horizontal' / 'vertical' / 'yes'.

position

read-only returns position in pixels within client window as “x,y”.

value

Name identifier of the active toggle.

value_handle

Changes the active toggle to given name.

Public Class Methods

new(toggles, &block) click to toggle source

Creates an instance of the radio container.

toggles

a vbox or hbox containing the toggle controls

block

optional block to set up the container's attributes.

# File lib/wrapped/radio.rb, line 26
def initialize toggles, &block
  @handle = IupLib.IupRadio toggles.handle

  # run any provided block on instance, to set up further attributes
  self.instance_eval &block if block_given?
end