Extra, optional data used by a VerticalLayout instance to position and size a display object.

Available since

1.0.0

.

See:

Constructor

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

Creates a new VerticalLayoutData object from the given arguments.

Available since

1.0.0

.

Variables

@:value(null)percentHeight:Null<Float> = null

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

.

@:value(null)percentWidth:Null<Float> = null

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

.