# IupCbox

Definition: | include pGUI.e Ihandle ih = IupCbox(Ihandles children={}, string attributes="", dword_seq args={})
Description: | Creates a void container for positioning elements in absolute coordinates. It is a concrete layout container. The IupCbox is equivalent of a IupVbox or IupHbox where all the children have the FLOATING attribute set to YES, but children must use CX and CY attributes instead of the POSITION attribute. It should only ever be used when no text string is ever any longer than it currently is, when translated to any language or displayed in any font, all images are a fixed size, and there is no need to reposition elements when the dialog is resized. Which is basically never, not that my negative opinion should stop you from using the quickest tool for a one-off/throwaway utility - however I would hazard that you might regret using this long-term. Technically it is probably possible to manually resize/reposition the elements of an IupCbox, but that would certainly be much more work than using nested IupHbox and IupVbox, which are therefore recommended instead. children: list of the elements that will be placed in the box. It can be empty. For more information on the attributes and args parameters see IupSetAttributes. It does not have a native representation. Returns: the identifier of the created element.
pwa/p2js: | Not supported
See Also: | IupVbox, IupHbox
Notes: | The box can be created with no elements and filled dynamically using IupAppend() or IupInsert(). The box will NOT expand its children, it will allow its children to expand according to the space left in the box parent. So for the expansion to occur, the children must be expandable with EXPAND!=NO, and there must be room in the box parent. When translating C code, note that internally Phix only uses the C function IupCboxv, which accepts a single null-terminated list, and does not use the variable-parameter C IupCbox function. It is perfectly legal (in Phix) to specify an empty list ({}) for the children parameter, but not NULL.
Attributes: |
EXPAND | (non inheritable) The default value is "YES". See the documentation of the attribute for EXPAND inheritance.
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.
WID | (read-only) returns -1 if mapped.
also | FONT, NAME, POSITION, CLIENTSIZE, CLIENTOFFSET, MINSIZE, MAXSIZE: also accepted.
Attributes: | (at Children)
CX, CY | (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.