# IupZbox

Definition: | include pGUI.e Ihandle ih = IupZbox(Ihandles children={}, string attributes="", dword_seq args={})
Description: | Creates a void container for composing elements in hidden layers with only one layer visible. It is a box that piles up the children it contains, only the one child is visible. 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.
Notes: | Zbox works by changing the VISIBLE attribute of its children, so if any of the grand children has its VISIBLE attribute directly defined then Zbox will NOT change its state. The box can be created with no elements and filled dynamically using IupAppend() or IupInsert(). IMPORTANT: each element must have a name defined by IupSetHandle. Its children automatically receives a name when the child is appended or inserted into the tabs. (since 3.16) The ZBOX relies on the VISIBLE attribute. If a child that is hidden by the zbox has its VISIBLE attribute changed then it can be made visible regardless of the zbox configuration. For the zbox behave as a IupTabs use native containers as immediate children of the zbox, like IupScrollBox, IupTabs, IupFrame or IupBackgroundBox. When translating C code, note that internally Phix only uses the C function IupZboxv, which accepts a single null-terminated list, and does not use the variable-parameter C IupZbox function. It is perfectly legal (in Phix) to specify an empty list ({}) for the children parameter, but not NULL.
Attributes: |
ALIGNMENT | (non inheritable) Defines the alignment of the visible child. Possible values: "NORTH", "SOUTH", "WEST", "EAST", "NE", "SE", "NW", "SW", "ACENTER". Default: "NW".
CHILDSIZEALL | (non inheritable): compute the natural size using all children. If set to NO will compute using only the visible child. Default: Yes. (since 3.27)
EXPAND | (non inheritable) The default value is "YES".
VALUE | (non inheritable) The visible child accessed by its name. The value passed must be the name of one of the children contained in the zbox. Use IupSetHandle or IupSetAttributeHandle to associate a child to a name. When the value is changed the selected child is made visible and all other children are made invisible, regardless their previous visible state.
VALUE_HANDLE | (non inheritable) The visible child accessed by its handle. The value passed must be the handle of a child contained in the zbox. When the zbox is created, the first element inserted is set as the visible child. (since 3.0)
VALUEPOS | (non inheritable) The visible child accessed by its position. The value passed must be the index of a child contained in the zbox, starting at 0. When the zbox is created, the first element inserted is set as the visible child. (since 3.0)
SIZE / RASTERSIZE | (non inheritable) The default size is the smallest size that fits its largest child. All child elements are considered even invisible ones, except when FLOATING=YES in a child.
WID | (read-only) returns -1 if mapped.
also | FONT, NAME, POSITION, CLIENTSIZE, CLIENTOFFSET, MINSIZE, MAXSIZE: also accepted.
Attributes: | (at Children)
FLOATING | (non inheritable) (at children only) If a child has FLOATING=YES then its size and position will be ignored by the layout processing. Default: "NO". (since 3.0)
See Also: | IupHbox, IupVbox