class LayoutGroup
package feathers.controls
extends FeathersControl › MeasureSprite › ValidatingSprite
extended by LayoutViewPort, Application
A generic container that supports layouts and automatically sizes itself based on its content.
The following example creates a layout group with a horizontal layout and adds two buttons to it:
var group = new LayoutGroup();
var layout = new HorizontalLayout();
layout.gap = 20.0;
layout.padding = 20.0;
group.layout = layout;
this.addChild(group);
var yesButton = new Button();
yesButton.text = "Yes";
group.addChild(yesButton);
var noButton = new Button();
noButton.text = "No";
group.addChild(noButton);
1.0.0
.See:
feathers.controls.ScrollContainer
is a layout container that supports scrolling
Constructor
Variables
autoSizeMode:AutoSizeMode = CONTENT
Determines how the layout group will set its own size when its dimensions (width and height) aren't set explicitly.
In the following example, the layout group will be sized to match the stage:
group.autoSizeMode = STAGE;
Usually defaults to AutoSizeMode.CONTENT
. However, if this component
is the root of the OpenFL display list, defaults to AutoSizeMode.STAGE
instead.
1.0.0
.See:
backgroundSkin:DisplayObject = null
The default background skin to display behind all content added to the group. The background skin is resized to fill the complete width and height of the group.
The following example passes a bitmap for the layout group to use as a background skin:
group.backgroundSkin = new Bitmap(bitmapData);
1.0.0
.See:
disabledBackgroundSkin:DisplayObject = null
The default background skin to display behind all content added to the group. The background skin is resized to fill the complete width and height of the group.
The following example gives the group a disabled background skin:
group.disabledBackgroundSkin = new Bitmap(bitmapData);
group.enabled = false;
1.0.0
.See:
layout:ILayout = null
The layout algorithm used to position and size the group's items.
The following example tells the group to use a vertical layout:
var layout = new VerticalLayout();
layout.gap = 20.0;
layout.padding = 20.0;
layout.horizontalAlign = CENTER;
group.layout = layout;
1.0.0
.Methods
Static variables
staticread onlyVARIANT_TOOL_BAR:String = "toolBar"
A variant used to style the group as a tool bar. Variants allow themes to provide an assortment of different appearances for the same type of UI component.
The following example uses this variant:
var group = new LayoutGroup();
group.variant = LayoutGroup.VARIANT_TOOL_BAR;
1.0.0
.See: