mx.containers
Class
Box
Direct Known Subclasses
mx.containers.DividedBox, mx.containers.Grid, mx.containers.GridRow, mx.containers.HBox, mx.containers.NavBar, mx.containers.VBox, mx.core.Application
class
Box
extends mx.containers.ContainerThe Box class is the base class for HBox and VBox. A Box container lays out its children in either a single vertical column or a single horizontal row. The direction attribute determines whether to use vertical (default) or horizontal layout. You use the <mx:Box>, <mx:VBox>, and <mx:HBox> tags to define Box containers.
MXML Syntax
The <Box> container inherits all the properties of its parent classes, and the following properties:
<mx:Box
direction="vertical|horizontal"
horizontaAlign="left|center|right"
horizontalGap="6"
marginBottom="0"
marginTop="0"
verticalAlign="top|middle|bottom"
verticalGap="6">
...
child tags
...
/>
See Also
mx.containers.HBox
mx.containers.VBox
| setRelativeChildHeights() : Void
Assigns a heightFlex to each child, and makes the preferred height of each one 0, so that together they occupy the entire height of a VBox but have the specified relative heights. |
| setRelativeChildWidths() : Void
Assigns a widthFlex to each child, and makes the preferred width of each one 0, so that together the children occupy the entire width of an HBox but have the specified relative widths. |
| direction:String
[Read/Write]
Orientation of a Box container. |
marginBottom |
Type: Number
Format: Length
CSS Inheritance: no
Number of pixels between the container`s bottom border and its content area. The default value is 0. |
marginTop |
Type: Number
Format: Length
CSS Inheritance: no
Number of pixels between the container`s top border and its content area. The default value is 0. |
horizontalAlign |
CSS Inheritance: no
Horizontal alignment of children in the container. The default is left. Possible values are left, center, and right. |
verticalAlign |
CSS Inheritance: no
Vertical alignment of children in the container. The default is top. Possible values are top, middle, and bottom. |
horizontalGap |
Type: Number
Format: Length
CSS Inheritance: no
Number of pixels between children in the horizontal direction. The default value is 8. |
verticalGap |
Type: Number
Format: Length
CSS Inheritance: no
Number of pixels between children in the vertical direction. The default value is 8. |
setRelativeChildHeights
setRelativeChildHeights() : Void
Assigns a heightFlex to each child, and makes the preferred height of each one 0, so that together they occupy the entire height of a VBox but have the specified relative heights. This function expects as many parameters, each of type Number, as there are children. For example, setRelativeChildHeights(2, 1, 1) makes the first child occupy half of the available height of the HBox; the second and third children each occupy one fourth of the available height.
setRelativeChildWidths
setRelativeChildWidths() : Void
Assigns a widthFlex to each child, and makes the preferred width of each one 0, so that together the children occupy the entire width of an HBox but have the specified relative widths. This function expects as many parameters, each of type Number, as there are children. For example, setRelativeChildWidths(2, 1, 1) makes the first child occupy half of the available width of the HBox; the second and third children each occupy one fourth of the available width.
direction
direction:String
[Read/Write]
Orientation of a Box container. Possible values are horizontal and vertical. The default value is vertical.