wax.Box
TypeComponent
Ownerwax
Dependencieswax.Element, wax
Basewax.Element
Element tagdiv
Description

An abstract component, implemented by wax.VBox and wax.HBox. Items placed inside a box have their size and position dinamically changed according to their wax.Element.flexibility. Boxes are very useful to design your applications layout.

Attributes
Inherited from wax.Element: flex, contextMenu, tooltip, disabled, draggable, display
boxSpacing
number

The space (in pixels) between elements inside the box.

Methods
Inherited from wax.Element: getContainer, add, remove, pack, empty, raise, hangsFrom, getDocX, getDocY, getMouseX, getMouseY, acceptDrop, drag, getDragElem
getSize
number getSize()

Returns the box size (in pixels).

getChildSize
number getChildSize(element child)

Returns the size of the given item (in pixels).

childelement

One of the items inside the box.

packChild
void packChild(element child, element pos, number size)
Undocumented.
childelement

The child to pack.

poselement

The new position of the child, in pixels.

sizenumber

The new size of the child, in pixels. If set to -1, the element's size is not changed.