IUP::Sbox - [GUI element] container for expanding/contracting the child size in one direction
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.
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
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:
Changes the color of the bar handler. The value should be given in "R G B" color style. Default: "192 192 192".
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".
It will expand automatically only in the direction opposite to the handler.
Returns -1 if mapped.
The following common attributes are also accepted:
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.
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 element IUP::Sbox is used in the following sample scripts:
The original doc: iupsbox.html