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



Annotate this POD


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


IUP::Cbox - [GUI element] container for position elements in absolute coordinates


Creates a void container for position elements in absolute coordinates. It is a concrete layout container.

It does not have a native representation.

The IUP::Cbox is equivalent of a IUP::Vbox or IUP::Hbox where all the children have the FLOATING attribute set to YES, but children must use CX and CY attributes instead of the POSITION attribute.


CREATION - new() method

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

child: (named parameter) List of the references to elements (or just a single element) that will be placed in the box. It can be ommited (see note below).

Returns: The reference to the created element, or udnef 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.

NOTE: IUP::Cbox can be created with no elements (no child params passed to new() constructor) and be dynamic filled later using $element->Append() and/or $element->Insert() methods.


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


(non inheritable) (at children only)

Position in pixels of the child relative to the top-left corner of the box. Must be set for each child inside the box.


(non inheritable)

The default value is "YES".

SIZE / RASTERSIZE (non inheritable)

Must be defined for each child. If not defined for the box, then it will be the bounding box that includes all children in their position.



returns -1 if mapped.

The following common attributes are also accepted:


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


IUP::Vbox, IUP::Hbox

The original doc: iupcbox.html

syntax highlighting: