Table of Contents

uiHBox

Required: Aspire UI Components Lite Edition Version 1.1+

The uiHBox component is a layout container that organizes its child objects sequentially horizontally. It is essentially the same as uiBox except that the vertical property is always false. This class is provided for the sake of completion - it would be the same if you use a uiBox instance, but the use of this class could improve code clarity (explicitly indicating that the box is horizontal).

By using automatic layout, UI objects can be repositioned and resized automatically in response to changes in the text styles, skins, and/or embedded contents. This gives us great flexibility when changing/testing text styles, skins, and/or embedded contents, without having to re-compute desired sizes and positions manually.

NOTE: If you wish to place UI objects manually via the move(x,y) method, use the uiPane container instead.


Using uiHBox

ActionScript 3.0 Example

import com.ghostwire.ui.containers.uiHBox;
import com.ghostwire.ui.controls.uiLabelButton;
 
var btn1:uiLabelButton = new uiLabelButton("Button 1");
var btn2:uiLabelButton = new uiLabelButton("Button 2");
var btn3:uiLabelButton = new uiLabelButton("Button 3");
 
var box:uiHBox = new uiHBox();
box.addChild(btn1);
box.addChild(btn2);
box.addChild(btn3);
 
addChild(box);

uiBox example


API Reference

For more information on the members of the com.ghostwire.ui.containers.uiHBox class, please refer to the API Reference.