class VerticalLayout
package feathers.layout
extends EventDispatcher
implements IDragDropLayout, ILayout
Positions items from top to bottom in a single column.
Events:
openfl.events.Event.CHANGE | Dispatched when a property of the layout changes, which triggers the container to invalidate. |
---|
1.0.0
.See also:
Constructor
Variables
gap:Float
The space, in pixels, between each two adjacent items in the layout.
If the gap
is set to Math.POSITIVE_INFINITY
, the items will be
positioned as far apart as possible. In this case, the gap will never be
smaller than minGap
.
In the following example, the layout's gap is set to 20 pixels:
layout.gap = 20.0;
1.0.0
.See also:
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;
1.0.0
.See also:
justifyResetEnabled:Bool
Indicates if the width of items should be reset if the horizontalAlign
property is set to HorizontalAlign.JUSTIFY
and the explicit width of
the parent container is not set.
1.0.0
.See also:
minGap:Float
If the value of the gap
property is Math.POSITIVE_INFINITY
, meaning
that the gap will fill as much space as possible and position the items
as far from each other as they can go without going outside of the view
port bounds, the final calculated value of the gap will not be smaller
than the value of the minGap
property.
In the following example, the layout's minimum gap is set to 4 pixels:
layout.minGap = 4.0;
1.0.0
.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;
1.0.0
.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;
1.0.0
.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;
1.0.0
.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;
1.0.0
.percentHeightResetEnabled:Bool
Indicates if the height of items should be reset for re-measurement if
the item has HorizontalLayoutData
with the percentHeight
property
populated and the container's height is not explicitly set.
Useful if changes to the items' content might affect their measured dimensions after applying the percentages. For instance, if changing a component's text should cause it to resize.
1.0.0
.See also:
percentWidthResetEnabled:Bool
Indicates if the width of items should be reset for re-measurement if
the item has HorizontalLayoutData
with the percentWidth
property
populated and the container's width is not explicitly set.
Useful if changes to the items' content might affect their measured dimensions after applying the percentages. For instance, if changing a component's text should cause it to resize.
1.0.0
.See also:
verticalAlign: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;
1.0.0
.See also:
Methods
getDragDropIndex(items:Array<DisplayObject>, x:Float, y:Float, width:Float, height:Float):Int
getDragDropRegion(items:Array<DisplayObject>, dropIndex:Int, x:Float, y:Float, width:Float, height:Float, ?result:Rectangle):Rectangle
layout(items:Array<DisplayObject>, measurements:Measurements, ?result:LayoutBoundsResult):LayoutBoundsResult
See also:
setPadding(value:Float):Void
Sets all four padding properties to the same value.
1.0.0
.See also: