Positions items of different dimensions from left to right in multiple rows. When the width of a row reaches the width of the container, a new row will be started. Constrained to the suggested width, the content's total height will change as the number of items increases or decreases.

Events:

openfl.events.Event.CHANGE
Available since

1.0.0

.

See also:

Constructor

new()

Creates a new FlowRowsLayout object.

Available since

1.0.0

.

Variables

@:flash.propertyhorizontalAlign:HorizontalAlign

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

Note: The HorizontalAlign.JUSTIFY constant is not supported by this layout.

The following example aligns each row's content to the right:

layout.horizontalAlign = RIGHT;
Available since

1.0.0

.

See also:

@:flash.propertyhorizontalGap:Float

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

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

layout.horizontalGap = 20.0;
Available since

1.0.0

.

@:flash.propertypaddingBottom: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

.

@:flash.propertypaddingLeft: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

.

@:flash.propertypaddingRight: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

.

@:flash.propertypaddingTop: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

.

@:flash.propertyrowVerticalAlign:VerticalAlign

How items in a row are positioned vertically (along the y-axis) if they are smaller than the total height of the row.

Note: The VerticalAlign.JUSTIFY constant is not supported by this layout.

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

layout.verticalAlign = BOTTOM;
Available since

1.0.0

.

See also:

@:flash.propertyverticalAlign:VerticalAlign

How the content is positioned vertically (along the y-axis) within the container. If the total height of the content is larger than the available height within the container, then the positioning of the items will always start from the top.

Note: The VerticalAlign.JUSTIFY constant is not supported by this layout.

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

layout.verticalAlign = BOTTOM;
Available since

1.0.0

.

See also:

@:flash.propertyverticalGap:Float

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

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

layout.verticalGap = 20.0;
Available since

1.0.0

.

Methods

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

setGap(value:Float):Void

Sets both horizontal and vertical gap properties to the same value.

Available since

1.0.0

.

See also:

setPadding(value:Float):Void

Sets all four padding properties to the same value.

Available since

1.0.0

.

See also: