NAME

IUP::Sbox - [GUI element] container for expanding/contracting the child size in one direction

DESCRIPTION

Creates a void container that allows its child to be resized. Allows expanding and contracting the child size in one direction.

It does not have a native representation but it contains also a IUP::Canvas to implement the bar handler.

Natural Size After Expanding the Sbox Expanding the Dialog After Expanding the Sbox

USAGE

CREATION - new() method

#standard way
my $sbox = IUP::Sbox->new( child=>[$elem1, $elem2], ANYATTRIBUTE=>'any value' );

#or with just a single child
my $sbox = IUP::Sbox->new( child=>$elem, ANYATTRIBUTE=>'any value' );

#or with just 1 parameter (arrayref)
my $sbox = IUP::Sbox->new( [$elem1, $elem2] );

#or with just 1 parameter (reference to child elements)
my $sbox = IUP::Sbox->new( $elem ); 

child: (named parameter) List of the references to elements (or just a single element) that will receive the box. It can be undef or ommited.

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:

COLOR

Changes the color of the bar handler. The value should be given in "R G B" color style. Default: "192 192 192".

DIRECTION

(creation only)

Indicates the direction of the resize and the position of the bar handler. Possible values are "NORTH", "SOUTH" (vertical direction), "EAST" or "WEST" (horizontal direction). Default: "EAST".

EXPAND

(non inheritable)

It will expand automatically only in the direction opposite to the handler.

WID

(read-only)

Returns -1 if mapped.

The following common attributes are also accepted:

NOTES

The controls that you want to be resized must have the EXPAND=YES attribute set. The control inside the sbox will not be resized with a size lesser than its Natural size. See the IUP::Manual::05_DialogLayout for mode details on sizes.

The IUP::Canvas bar handler is always the first child of the sbox. It can be obtained using GetChild or GetNextChild.

IUP::Sbox can be resized above the maximum size so some controls go to outside the dialog area at right or bottom. In fact this is part of the dynamic layout default reposition of controls inside the dialog. See the Refresh function. The IUP layout does not have a maximum limit only a minimum, except if you use the MAXSIZE common attribute.

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

EXAMPLES

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

SEE ALSO

The original doc: iupsbox.html