NAME

IUP::Zbox - [GUI element] container for composing elements in hidden layers with only one layer visible

DESCRIPTION

Creates a void container for composing elements in hidden layers with only one layer visible. It is a box that piles up the children it contains, only the one child is visible.

It does not have a native representation.

Zbox works by changing the VISIBLE attribute of its children, so if any of the grand children has its VISIBLE attribute directly defined then Zbox will NOT change its state.

USAGE

CREATION - new() method

 #standard way
 my $zbox = IUP::Zbox->new( child=>[$elem1, $elem2], ANYATTRIBUTE=>'any value' );
 
 #or with just a single child
 my $zbox = IUP::Zbox->new( child=>$elem, ANYATTRIBUTE=>'any value' );
 
 #or with just 1 parameter (arrayref)
 my $zbox = IUP::Zbox->new( [$elem1, $elem2] );
 
 #or with just 1 parameter (reference to child elements)
 my $zbox = IUP::Zbox->new( $elem );

child: (named parameter) List of the references to elements (or just a single element) that will be placed in the box. Can be undef.

Returns: the identifier of the created element, or undef if an error occurs.

NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.

ATTRIBUTES

For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:

ALIGNMENT

(non inheritable)

Defines the alignment of the visible child. Possible values:

 "NORTH", "SOUTH", "WEST", "EAST",
 "NE", "SE", "NW", "SW",
 "ACENTER".

Default: "NW".

EXPAND

(non inheritable)

The default value is "YES".

FLOATING

(non inheritable, at children only)

If a child has FLOATING=YES then its size and position will be ignored by the layout processing. Default: "NO".

VALUE

(non inheritable)

The visible child. The value passed must be the perl reference or name of one of the children contained in the zbox.

To associate a name to element use SetName or name=>'ElemName' named parameter of new() constructor.

When the value is changed the selected child is made visible and all other children are made invisible, regardless their previous visible state.

VALUE_HANDLE

(non inheritable)

The visible child accessed by its handle. The value passed must be the handle of a child contained in the zbox. When the zbox is created, the first element inserted is set as the visible child.

VALUEPOS

(non inheritable)

The visible child accessed by its position. The value passed must be the index of a child contained in the zbox, starting at 0. When the zbox is created, the first element inserted is set as the visible child.

SIZE / RASTERSIZE (non inheritable)

The default size is the smallest size that fits its largest child. All child elements are considered even invisible ones, except when FLOATING=YES in a child.

WID

(read-only)

Returns -1 if mapped.

The following common attributes are also accepted:

NOTES

The box can be created with no elements and be dynamic filled using Append or Insert.

EXAMPLES

The element IUP::Zbox is used in the following sample scripts:

SEE ALSO

IUP::Hbox, IUP::Vbox

The original doc: iupzbox.html