class Iup::Expander
An expandable container for a single widget. The user can show or hide the child widget, as required.
Example
The following places a button in an expandable area, with a blue title:
bt = Iup::Button.new('Button ONE') exp = Iup::Expander.new(bt) do |e| e.title = 'Expander title' e.forecolor = '0 0 255' end
Attributes
If set, child will be shown when mouse hovers over container. Values âyesâ / ânoâ.
Color of background in title area, as âr g bâ.
Position of expander bar, as âtopâ / âbottomâ / âleftâ / ârightâ.
Size of bar - defaults to text line height + 5.
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â.
Color of text in title area, as âr g bâ.
Returns position in pixels within client window as âx,yâ.
Size of the container, in pixels, value as âwidthxheightâ.
Show or hide child, as âopenâ / âcloseâ.
Displayed on box in title area.
Public Class Methods
Source
# File lib/wrapped/expander.rb, line 23 def initialize child @handle = IupLib.IupExpander(child.handle) yield self if block_given? end
Creates an instance of the Expander. If a block is given, the new instance is yielded to it.
-
child- the child widget to display.
Callbacks
Attributes
Callback called after the expander state is interactively changed. Callback must respond to call and take no arguments.
Callback called before the expander state is interactively changed. Callback must respond to call and take no arguments, returning new state or Iup::IGNORE.