UIListLayout

Show Deprecated

A UIListLayout positions sibling UI elements in rows or columns within the parent UI container, based on the FillDirection. The Position and Rotation properties of each sibling GuiObject are either ignored or overridden by the list layout, while each sibling retains its defined Size unless the layout is configured to utilize a flex layout. See List and Flex Layouts for further information.

UIListLayouts illustrating FillDirection of either horizontal
or vertical.

To control the layout order of siblings, set SortOrder to either Enum.SortOrder.Name or Enum.SortOrder.LayoutOrder, then rename siblings in alphanumerical order or set their LayoutOrder value, respectively. UIListLayout will automatically re‑layout elements when elements are added/removed, or if a sibling's Name or LayoutOrder changes.

List layout examples illustrating numerical LayoutOrder
sorting or alphanumerical Name sorting.

Padding between siblings is controlled through the Padding property, and wrapping within the parent container's bounds through the Wraps boolean. Alignment of siblings within the parent container is controlled through HorizontalAlignment and VerticalAlignment unless the layout is configured to utilize a flex layout.

Note that there are performance implications of using a flex‑enabled list layout, since extra calculations are needed to calculate flex basis sizes, flexed sizes, and line wrapping. Flex is enabled on a UIListLayout when the following properties are set, or if any GuiObject sibling has a UIFlexItem parented to it:

Summary

Properties

Properties inherited from UIGridStyleLayout

Properties

Properties

HorizontalFlex

Read Parallel

ItemLineAlignment

Read Parallel

Padding

Read Parallel
Read Parallel

Wraps

Read Parallel

Methods

Events