## IupZbox

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.

It does not have a native representation.

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.

### Creation

    Ihandle* IupZbox (Ihandle *child, ...); [in C]
    Ihandle* IupZboxV(Ihandle* child, va_list arglist); [in C]
    Ihandle* IupZboxv (Ihandle **children); [in C]
    iup.zbox{child, ... : ihandle} -> (ih: ihandle) [in Lua]
    zbox(child, ...) [in LED]

child, ... : List of the elements that will be placed in the box. NULL must be used to define the end of the list in C. It can be empty, but in C must have at least the NULL terminator..

> IMPORTANT: in C, each element must have a name defined by IupSetHandle. In Lua a name is always automatically created, but you can change it later.

Returns: the identifier of the created element, or NULL if an error occurs.

### 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. In Lua you can also use the element reference directly. 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.

FONT, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE, THEME: 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)

### Notes

The box can be created with no elements and be dynamic filled using IupAppend or IupInsert.

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.

### Examples

Browse for Example Files

### See Also

IupHbox, IupVBox