Creates an user expander container. Allows the provided control to be enclosed in a box that allows expanding and contracting the element size in one direction.
It does not have a native representation but it uses a IupCanvas to implement the bar handler.
Ihandle* IupSbox(Ihandle* child); [in C] iup.sbox{child: ihandle} -> (elem: ihandle) [in Lua] sbox(child) [in LED]
child: Identifier of an interface element which will receive the frame. It can be NULL.
Returns: the identifier of the created element, or NULL if an error occurs.
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.
FONT, SIZE, RASTERSIZE, CLIENTSIZE, POSITION, MINSIZE, MAXSIZE: also accepted.
The controls that you want to be resized must have the EXPAND=YES attribute set.
The IupCanvas bar handler is always the first child of the sbox. It can be obtained using IupGetChild or IupGetNextChild.
IupSbox 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 IupRefresh function. The IUP layout does not have a maximum limit only a minimum.
![]() Natural Size |
![]() After Expanding the Sbox |
![]() Expanding the Dialog |
![]() After Expanding the Sbox |