View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
kmx > IUP-0.006 > IUP::Vbox



Annotate this POD


New  2
Open  1
View/Report Bugs
Source   Latest Release: IUP-0.305


IUP::Vbox - [GUI element] container for composing elements vertically


Creates a void container for composing elements vertically. It is a box that arranges the elements it contains from top to bottom.

It does not have a native representation.


CREATION - new() method

 #standard way
 my $vbox = IUP::Vbox->new( child=>[$elem1, $elem2], ANYATTRIBUTE=>'any value' );
 #or with just a single child
 my $vbox = IUP::Vbox->new( child=>$elem, ANYATTRIBUTE=>'any value' );
 #or with just 1 parameter (arrayref)
 my $vbox = IUP::Vbox->new( [$elem1, $elem2] );
 #or with just 1 parameter (reference to child elements)
 my $vbox = IUP::Vbox->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.


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


(non inheritable)

Horizontally aligns the elements. Possible values: "ALEFT", "ACENTER", "ARIGHT". Default: "ALEFT".


(non inheritable*)

The default value is "YES". See the documentation of the attribute for EXPAND inheritance.


(non inheritable)

Forces all children to expand horizontally. Default: "NO". This has the same effect as setting EXPAND=HORIZONTAL on each child, but their vertical expansion will be preserved.


(non inheritable) (at children only)

If a child defines the expand weight, then it is used to multiply the free space used for expansion. (since iup-3.1)


(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".


Defines a vertical space in pixels between the children, =item CGAP is in the same units of the SIZE attribute for the height. Default "0". (CGAP since iup-3.0)


(non inheritable)

Same as GAP but are non inheritable.


(non inheritable)

Forces all children to get equal vertical space. The natural size height will be based on the highest child. Default: "NO". Notice that this does not changes the children size, only the available space for each one of them to expand. (since iup-3.0)


Defines a margin in pixels, CMARGIN is in the same units of the SIZE attribute. Its value has the format "widthxheight", where width and height are integer values corresponding to the horizontal and vertical margins, respectively. Default: "0x0" (no margin). (CMARGIN since iup-3.0)


(non inheritable)

Same as MARGIN but are non inheritable.


(non inheritable)

normalizes all children natural size to be the biggest natural size among them. All natural width will be set to the biggest width, and all natural height will be set to the biggest height according to is value. Can be NO, HORIZONTAL, VERTICAL or BOTH. Default: "NO".

SIZE / RASTERSIZE (non inheritable)

Defines the height of the box. When consulted behaves as the standard SIZE/RASTERSIZE attributes. The standard format "wxh" can also be used, but width will be ignored (since iup-3.3).



Returns -1 if mapped.

The following common attributes are also accepted:


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

The box will NOT expand its children, it will allow its children to expand according to the space left in the box parent. So for the expansion to occur, the children must be expandable with EXPAND!=NO, and there must be room in the box parent.


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


IUP::Zbox, IUP::Hbox

The original doc: iupvbox.html

syntax highlighting: