class LayoutGroup
package feathers.controls
extends FeathersControl › MeasureSprite › ValidatingSprite
extended by GridViewRowRenderer, LayoutGroupItemRenderer, TreeGridViewRowRenderer, LayoutViewPort, Application, Form
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 also:
feathers.controls.ScrollContainer
is a layout container that supports scrolling
Static variables
staticfinalread 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 also:
Constructor
Variables
autoSizeMode:AutoSizeMode
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;
1.0.0
.See also:
backgroundSkin:DisplayObject
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 also:
disabledBackgroundSkin:DisplayObject
The background skin to display behind all content added to the group when the group is disabled. 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 also:
layout:ILayout
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
.maskSkin:DisplayObject
A skin to mask the content of the layout group. The skin is resized to
the full dimensions of the layout group. It is passed to the mask
property.
The following example passes a RectangleSkin
with a cornerRadius
for
the layout group's mask skin:
var maskSkin = new RectangleSkin();
maskSkin.fill = SolidColor(0xff0000);
maskSkin.cornerRadius = 10.0;
group.maskSkin = maskSkin;
1.0.0
.See also:
Methods
collectChildren(?result:Array<DisplayObject>):Array<DisplayObject>
Collects all children in an array.
1.3.0
.readjustLayout():Void
Readjusts the layout of the group according to its current content.
Call this method when changes to the content cannot be automatically
detected by the container. For instance, Feathers UI components dispatch
Event.RESIZE
when their width
and height
values change, but
standard OpenFL display objects like Sprite
do not.
1.3.0
.