class Iup::ZBox
A container of a list of widgets, but only displays one of them.
Example
The following example stores four widgets and displays the label:
zbox = Iup::ZBox.new(frame, text, label, button) do |b| b.alignment = 'acenter' b.expand = 'yes' b.valuepos = 2 end
Attributes
alignment of visible child. Values: ânorthâ / âsouthâ / âeastâ / âwestâ/ âneâ / ânwâ / âseâ / âswâ / âacenterâ
returns current offset of box in its client as âwidthxheightâ.
returns current size of box as âwidthxheightâ.
Allows container to fill available space in indicated direction. Values ânoâ / âhorizontalâ / âverticalâ / âyesâ.
Size of the container, in pixels, value as âwidthxheightâ.
Size of the container, in character units, value as âwidthxheightâ.
The visible child, accessed by its index position, 0-indexed.
Public Class Methods
Source
# File lib/wrapped/zbox.rb, line 25 def initialize *widgets @handle = IupLib.IupZbox(*widget_list(widgets)) # run any provided block on instance, to set up further attributes yield self if block_given? end
Creates a new instance. If a block is given, the new instance is yielded to it.
-
widgets- one or more child widgets