UIGridStyleLayout
The base class for grid style UI layouts.
Memory category | Instances |
---|
Member index 7
Description
The base class for grid style UI layouts.
History 36
- 647 Change Category of VerticalAlignment from Behavior to Alignment
- 647 Change Category of HorizontalAlignment from Behavior to Alignment
- 573 Change ReturnType of SetCustomSortFunction from void to null
- 573 Change ReturnType of ApplyLayout from void to null
- 553 Change Default of VerticalAlignment from to
- 553 Change Default of SortOrder from to
- 553 Change Default of HorizontalAlignment from to
- 553 Change Default of FillDirection from to
- 553 Change Default of AbsoluteContentSize from to
- 486 Change ThreadSafety of VerticalAlignment from ReadOnly to ReadSafe
- 486 Change ThreadSafety of SortOrder from ReadOnly to ReadSafe
- 486 Change ThreadSafety of HorizontalAlignment from ReadOnly to ReadSafe
- 486 Change ThreadSafety of FillDirection from ReadOnly to ReadSafe
- 462 Change ThreadSafety of SetCustomSortFunction from to Unsafe
- 462 Change ThreadSafety of ApplyLayout from to Unsafe
- 462 Change ThreadSafety of VerticalAlignment from to ReadOnly
- 462 Change ThreadSafety of SortOrder from to ReadOnly
- 462 Change ThreadSafety of HorizontalAlignment from to ReadOnly
- 462 Change ThreadSafety of FillDirection from to ReadOnly
- 462 Change ThreadSafety of AbsoluteContentSize from to Unsafe
- 397 Change CanSave of AbsoluteContentSize from true to false
- 378 Change Tags of ApplyLayout from [] to [Deprecated]
- 303 Change Tags of SetCustomSortFunction from [] to [Deprecated]
- 293 Change Parameters of SetCustomSortFunction from (function: Function) to (function: Function = nil)
- 287 Add AbsoluteContentSize
- 285 Remove AbsoluteContentSize
- 286 Add AbsoluteContentSize
- 285 Remove AbsoluteContentSize
- 286 Add AbsoluteContentSize
- 274 Add SetCustomSortFunction
- 274 Add ApplyLayout
- 274 Add VerticalAlignment
- 274 Add SortOrder
- 274 Add HorizontalAlignment
- 274 Add FillDirection
- 274 Add UIGridStyleLayout
Members 7
AbsoluteContentSize
Type | Default | |
---|---|---|
Vector2 |
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 Object.Changed event immediately after the UI has changed, but if the value is read, it will become current and a Object.Changed event will fire on the next render step.
Thread safety | Unsafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 8
- 553 Change Default of AbsoluteContentSize from to
- 462 Change ThreadSafety of AbsoluteContentSize from to Unsafe
- 397 Change CanSave of AbsoluteContentSize from true to false
- 287 Add AbsoluteContentSize
- 285 Remove AbsoluteContentSize
- 286 Add AbsoluteContentSize
- 285 Remove AbsoluteContentSize
- 286 Add AbsoluteContentSize
ApplyLayout
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
The ApplyLayout method forces sibling UI elements to be re-laid out in case the sorting criteria may have changed (such as when UIGridStyleLayout.SortOrder is set to Custom, and the UIGridStyleLayout:SetCustomSortFunction() behavior changed). Re-layouts automatically happen when UI elements are added/removed, or their Instance.Name or GuiObject.LayoutOrder change.
The manner in which sibling UI elements are laid out is dependent on the implementation of this abstract class. In other words, a concrete class like UIListLayout or UIGridLayout is responsible for the actual element positioning.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of ApplyLayout from void to null
- 462 Change ThreadSafety of ApplyLayout from to Unsafe
- 378 Change Tags of ApplyLayout from [] to [Deprecated]
- 274 Add ApplyLayout
FillDirection
Type | Default | |
---|---|---|
FillDirection |
The FillDirection property determines the axis in which UI elements are laid out. FillDirection.Horizontal arranges objects from left to right, while 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 SortOrder.LayoutOrder.
Thread safety | ReadSafe |
---|---|
Category | Behavior |
Loaded/Saved | true |
History 4
- 553 Change Default of FillDirection from to
- 486 Change ThreadSafety of FillDirection from ReadOnly to ReadSafe
- 462 Change ThreadSafety of FillDirection from to ReadOnly
- 274 Add FillDirection
HorizontalAlignment
Type | Default | |
---|---|---|
HorizontalAlignment |
The HorizontalAlignment property determines the X axis alignment of the grid of UI elements, much like TextLabel.TextXAlignment does with TextLabel.Text.
Thread safety | ReadSafe |
---|---|
Category | Alignment |
Loaded/Saved | true |
History 5
- 647 Change Category of HorizontalAlignment from Behavior to Alignment
- 553 Change Default of HorizontalAlignment from to
- 486 Change ThreadSafety of HorizontalAlignment from ReadOnly to ReadSafe
- 462 Change ThreadSafety of HorizontalAlignment from to ReadOnly
- 274 Add HorizontalAlignment
SetCustomSortFunction
Parameters (1) | Default | |
---|---|---|
function | Function | nil |
Returns (1) | ||
null |
This method is deprecated. Use UIGridStyleLayout.SortOrder instead.
The function should take two arguments (each will be an Instance child to compare), and return true if a comes before b, otherwise return false. In other words, use this function the same way you would use a ' function. The sorting should be deterministic, otherwise sort will fail and fall back to name order.
Thread safety | Unsafe |
---|
History 5
- 573 Change ReturnType of SetCustomSortFunction from void to null
- 462 Change ThreadSafety of SetCustomSortFunction from to Unsafe
- 303 Change Tags of SetCustomSortFunction from [] to [Deprecated]
- 293 Change Parameters of SetCustomSortFunction from (function: Function) to (function: Function = nil)
- 274 Add SetCustomSortFunction
SortOrder
Type | Default | |
---|---|---|
SortOrder |
The SortOrder property determines the order in which child UI objects are placed in a layout.
For 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 SortOrder.Name, an alphanumeric sort is used on the Instance.Name of the child UI objects.
Thread safety | ReadSafe |
---|---|
Category | Behavior |
Loaded/Saved | true |
VerticalAlignment
Type | Default | |
---|---|---|
VerticalAlignment |
The VerticalAlignment property determines the Y axis alignment of the grid of UI elements, much like TextLabel.TextYAlignment does with TextLabel.Text.
Thread safety | ReadSafe |
---|---|
Category | Alignment |
Loaded/Saved | true |
History 5
- 647 Change Category of VerticalAlignment from Behavior to Alignment
- 553 Change Default of VerticalAlignment from to
- 486 Change ThreadSafety of VerticalAlignment from ReadOnly to ReadSafe
- 462 Change ThreadSafety of VerticalAlignment from to ReadOnly
- 274 Add VerticalAlignment