IupSbox
| Definition: |
include pGUI.e
Ihandle ih = IupSbox(Ihandln child=NULL, string attributes="", dword_seq args={}) |
| 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 also contains an IupCanvas to implement the bar handler. child: Identifier of an interface element which will receive the box. It can be NULL. For more information on the attributes and args parameters see IupSetAttributes. Returns: the identifier of the created element. |
| pwa/p2js: | Not supported. |
| 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 Layout Guide for mode details on sizes. The IupCanvas bar handler is always the first child of the sbox. It can be obtained using IupGetChild or IupGetNextChild. IupSbox can make the layout to be resized larger than the dialog size so some controls will be positioned 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 IupRefresh 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 later dynamically filled using IupAppend or IupInsert. In Phix (not C), IupSizeBox is a simple alias of IupSbox and behaves identially. |
| Attributes: | |
| BARSIZE | (non inheritable): controls the size of the bar handler. Default: 5. (since 3.27) |
| COLOR |
Changes the color of the bar handler. The value should be given in "R G B" color style. Default: "160 160 160". (changed in 3.28 to match IupSplit default color) |
| 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. |
| LAYOUTDRAG |
(non inheritable) When the bar is moved automatically update the children layout. Default: YES. If set to NO then the layout will be updated only when the mouse drag is released. (since 3.27) |
| SHOWGRIP |
(non inheritable) Shows the bar grip affordance. Default: NO. When set to NO, COLOR is used to fill the grip area. If set to "LINES" then instead of the traditional grip appearance, it will be two parallel lines. (since 3.27) |
| WID | (read-only) returns -1 if mapped. |
| also | FONT, NAME, SIZE, RASTERSIZE, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE: also accepted. |
| Examples: |
![]() Natural Size ![]() After Expanding the Sbox ![]() Expanding the Dialog ![]() After Expanding the Sbox |



