IupHbox

Creates a void container for composing elements horizontally. It is a box that arranges the elements it contains from left to right.

It does not have a native representation.

Creation

Ihandle* IupHbox(Ihandle *child, ...); [in C]
Ihandle* IupHboxV(Ihandle* child,va_list arglist); [in C]
Ihandle* IupHboxv(Ihandle **children); [in C]
iup.hbox{child, ...: ihandle} -> (ih: ihandle) [in Lua]
hbox(child, ...) [in LED]

child,... : List of identifiers 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..

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

Attributes

ALIGNMENT (non inheritable): Vertically aligns the elements. Possible values: "ATOP", "ACENTER", "ABOTTOM". Default: "ATOP".

EXPAND (non inheritable*): The default value is "YES". See the documentation of the attribute for EXPAND inheritance.

EXPANDCHILDREN (non inheritable): forces all children to expand vertically and to fully occupy its space available inside the box. Default: "NO". This has the same effect as setting EXPAND=VERTICAL on each child. (since 3.0)

GAP, CGAP: Defines an horizontal space in pixels between the children, CGAP is in the same units of the SIZE attribute for the width. Default: "0". (CGAP since 3.0)

NGAP, NCGAP (non inheritable): Same as GAP but are non inheritable. (since 3.0)

HOMOGENEOUS (non inheritable): forces all children to get equal horizontal space. The space width will be based on the largest child. Default: "NO". Notice that this does not changes the children size, only the available space for each one of them to expand. (since 3.0)

MARGIN, CMARGIN: Defines a margin in pixels, CMARGIN is in the same units of the SIZE attribute. Its value has the format "widthxheight", where width and height are integer values corresponding to the horizontal and vertical margins, respectively. Default: "0x0" (no margin). (CMARGIN since 3.0)

NMARGIN, NCMARGIN (non inheritable): Same as MARGIN but are non inheritable. (since 3.0)

NORMALIZESIZE (non inheritable): normalizes all children natural size to be the biggest natural size among them. All natural width will be set to the biggest width, and all natural height will be set to the biggest height according to is value. Can be NO, HORIZONTAL, VERTICAL or BOTH. Default: "NO". Same as using IupNormalizer. (since 3.0)

ORIENTATION (read-only) (non inheritable): Returns "HORIZONTAL". (since 3.28)

SIZE / RASTERSIZE (non inheritable): Defines the width of the box. When consulted behaves as the standard SIZE/RASTERSIZE attributes. The standard format "wxh" can also be used, but height will be ignored (since 3.3).

WID (read-only): returns -1 if mapped.


FONT, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE, THEME: also accepted.

Attributes (at Children)

EXPANDWEIGHT (non inheritable) (at children only): If a child defines the expand weight, then it is used to multiply the free space used for expansion. (since 3.1)

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.

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.

Also the hbox will not reduce its children beyond their horizontal natural size even if SHRINK=Yes at the dialog.

Examples

Browse for Example Files


HOMOGENEOUS=YES
EXPANDCHILDREN=YES

See Also

IupZbox, IupVBox