Provides optional percentage sizing for children of containers that use VerticalLayout.

Events:

openfl.events.Event.CHANGE
Available since

1.0.0

.

See also:

Constructor

new(?percentWidth:Float, ?percentHeight:Float)

Creates a new VerticalLayoutData object from the given arguments.

Available since

1.0.0

.

Variables

@:flash.propertypercentHeight:Null<Float>

The height of the layout object, as a percentage of the parent container's height. The parent container will calculate the sum of all of its children with explicit pixel heights, and then the remaining space will be distributed to children with percent heights.

A percentage may be specified in the range from 0.0 to 100.0. If the value is set to null, this property is ignored.

In the following example, the height of a container's child is set to 50% of the container's height:

var container = new LayoutGroup();
container.layout = new VerticalLayout();

var percentages = new VerticalLayoutData();
percentages.percentHeight = 50.0;

var child = new Label();
child.layoutData = percentages;
container.addChild(child);
Available since

1.0.0

.

@:flash.propertypercentWidth:Null<Float>

The width of the layout object, as a percentage of the parent container's width.

A percentage may be specified in the range from 0.0 to 100.0. If the value is set to null, this property is ignored.

In the following example, the width of a container's child is set to 50% of the container's width:

var container = new LayoutGroup();
container.layout = new VerticalLayout();

var percentages = new VerticalLayoutData();
percentages.percentWidth = 50.0;

var child = new Label();
child.layoutData = percentages;
container.addChild(child);
Available since

1.0.0

.