Skip to content

Class · inherits UILayout

UIGridStyleLayout

Official docs ↗

The base class for grid style UI layouts.

About UIGridStyleLayout

The base class for grid style UI layouts.

Properties 5

  • AbsoluteContentSize: Vector2ReadOnlyNotReplicatedThe absolute size of space being taken up by the grid layout.

    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.

  • FillDirection: FillDirectionDetermines the axis in which UI objects are laid out.

    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.

  • HorizontalAlignment: HorizontalAlignmentDetermines the horizontal alignment of UI elements within the parent element.

    The HorizontalAlignment property determines the X axis alignment of the grid of UI elements, much like TextLabel.TextXAlignment does with TextLabel.Text.

  • SortOrder: SortOrderDetermines the order in which child UI objects are placed in a layout.

    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.

  • VerticalAlignment: VerticalAlignmentDetermines the vertical alignment of UI elements within the parent element.

    The VerticalAlignment property determines the Y axis alignment of the grid of UI elements, much like TextLabel.TextYAlignment does with TextLabel.Text.

UIGridStyleLayout also has every member of UILayout. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.