UIGridStyleLayout
The base class for grid style UI layouts.
Summary
Properties
The absolute size of space being taken up by the grid layout.
Determines the axis in which UI objects are laid out.
Determines the horizontal alignment of UI elements within the parent element.
Determines the order in which child UI objects are placed in a layout.
Determines the vertical alignment of UI elements within the parent element.
Properties
AbsoluteContentSize
The AbsoluteContentSize property of a UIGridStyleLayout reveals how much space the elements of the grid are taking up, including any padding created by the grid. This property is particularly useful to size containers of grids such as Frames to make sure they aren't any larger than the grid itself.
This property updates as soon as it's read. It will not fire a Instance.Changed event immediately after the UI has changed, but if the value is read, it will become current and a Instance.Changed event will fire on the next render step.
FillDirection
The FillDirection property determines the axis in which UI elements are laid out. Enum.FillDirection.Horizontal arranges objects from left to right, while Enum.FillDirection.Vertical arranges objects from top to bottom. To reverse elements, such as to arrange right to left, you'll need to reverse the sorting; for example by negating the child UI objects' GuiObject.LayoutOrder values when UIGridStyleLayout.SortOrder is set to Enum.SortOrder.LayoutOrder.
HorizontalAlignment
The HorizontalAlignment property determines the X axis alignment of the grid of UI elements, much like TextLabel.TextXAlignment does with TextLabel.Text.
SortOrder
The SortOrder property determines the order in which child UI objects are placed in a layout.
For Enum.SortOrder.LayoutOrder, an ascending sort is used on the LayoutOrder property of child UI objects. If two children share the same LayoutOrder, whichever was added sooner to the parent object takes precedence.
For Enum.SortOrder.Name, an alphanumeric sort is used on the Instance.Name of the child UI objects.
VerticalAlignment
The VerticalAlignment property determines the Y axis alignment of the grid of UI elements, much like TextLabel.TextYAlignment does with TextLabel.Text.