horizontal box

 Widget 1  Widget 2 

Constructor

new (?relativeWidth:Float, ?columns:Array<HBoxColumn>)

Parameters:

relativeWidth

the widget relative width; defaults to 1

columns

the columns relative widths and alignements; defaults to null
[new HBoxColumn(0.3), new HBoxColumn(0.7)] for example

Throws:

String

if relativeWidth not in [0..1]

Methods

pack (widget:Widget):Box

adds a widget to display in the horizontal box

Parameters:

widget

the widget to add / display

Throws:

String

if widget is null or if widgets count > columns count

Returns:

the box instance

Inherited Variables

Inherited Methods

Defined by Box

clear ():Box

removes all widget from the box

Returns:

the box instance

Defined by Widget

getWidth ():Float

Returns:

the widget real width (in pixels), calculated from the width of the parent (or stage) and the relativeWidth

Defined by Sprite

startDrag (?lockCenter:Bool, ?bounds:Rectangle):Void

Defined by DisplayObjectContainer

Defined by InteractiveObject

Defined by DisplayObject

Defined by EventDispatcher