A simple list layout that positions items from left to right, in a single row, where every item fills the entire height of the container.

Available since

1.0.0

.

Constructor

new()

Creates a new HorizontalListLayout object.

Available since

1.0.0

.

Variables

@:value(0.0)gap:Float = 0.0

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

.

@:value(LEFT)horizontalAlign:HorizontalAlign = LEFT

How the content 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 the container's content to the right:

layout.horizontalAlign = RIGHT;
Available since

1.0.0

.

See also:

@:value(0.0)paddingBottom:Float = 0.0

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

.

@:value(0.0)paddingLeft:Float = 0.0

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

.

@:value(0.0)paddingRight:Float = 0.0

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

.

@:value(0.0)paddingTop:Float = 0.0

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

.

@:value(5.0)requestedColumnCount:Null<Float> = 5.0

The number of columns to render, if the width of the container has not been set explicitly. If null, shows all columns.

In the following example, the layout's requested column count is set to 2 complete items:

layout.requestedColumnCount = 2.0;
Available since

1.0.0

.

@:value(0.0)scrollX:Float = 0.0

@:value(0.0)scrollY:Float = 0.0

Methods

getNearestScrollPositionForIndex(index:Int, itemCount:Int, width:Float, height:Float, ?result:Point):Point

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