Positions items from top to bottom in a single column, and all items are resized to have the same width and height.

Events:

openfl.events.Event.CHANGE

Dispatched when a property of the layout changes, which triggers the container to invalidate.

Available since

1.0.0

.

See also:

Constructor

new()

Creates a new VerticalDistributedLayout object.

Available since

1.0.0

.

Variables

@:bindable("change")gap:Float

The space, in pixels, between each two adjacent items in the layout.

In the following example, the layout's gap is set to 20 pixels:

layout.gap = 20.0;
Available since

1.0.0

.

@:bindable("change")horizontalAlign:HorizontalAlign

How the content is positioned horizontally (along the x-axis) within the container.

The following example aligns the container's content to the right:

layout.horizontalAlign = RIGHT;
Available since

1.0.0

.

See also:

@:bindable("change")maxItemHeight:Float

The maximum height of an item in the layout.

In the following example, the layout's maximum item height is set to 20 pixels:

layout.maxItemHeight = 20.0;
Available since

1.0.0

.

@:bindable("change")minItemHeight:Float

The minimum height of an item in the layout.

In the following example, the layout's minimum item height is set to 20 pixels:

layout.minItemHeight = 20.0;
Available since

1.0.0

.

@:bindable("change")paddingBottom:Float

The space, in pixels, between the parent container's bottom edge and its content.

In the following example, the layout's bottom padding is set to 20 pixels:

layout.paddingBottom = 20.0;
Available since

1.0.0

.

@:bindable("change")paddingLeft:Float

The space, in pixels, between the parent container's left edge and its content.

In the following example, the layout's left padding is set to 20 pixels:

layout.paddingLeft = 20.0;
Available since

1.0.0

.

@:bindable("change")paddingRight:Float

The space, in pixels, between the parent container's right edge and its content.

In the following example, the layout's right padding is set to 20 pixels:

layout.paddingRight = 20.0;
Available since

1.0.0

.

@:bindable("change")paddingTop:Float

The space, in pixels, between the parent container's top edge and its content.

In the following example, the layout's top padding is set to 20 pixels:

layout.paddingTop = 20.0;
Available since

1.0.0

.

Methods

getDragDropIndex(items:Array<DisplayObject>, x:Float, y:Float, width:Float, height:Float):Int

Available since

1.3.0

.

See also:

@:value({ result : null })getDragDropRegion(items:Array<DisplayObject>, dropIndex:Int, x:Float, y:Float, width:Float, height:Float, ?result:Rectangle):Rectangle

Available since

1.3.0

.

See also:

layout(items:Array<DisplayObject>, measurements:Measurements, ?result:LayoutBoundsResult):LayoutBoundsResult