Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UITableLayout

Lays out sibling UI elements and their child UI elements as rows/columns and cells in a table.

Member index 4

HistoryMember
553FillEmptySpaceColumns: bool
553FillEmptySpaceRows: bool
553MajorAxis: TableMajorAxis
553Padding: UDim2
inherited from UIGridStyleLayout
553AbsoluteContentSize: Vector2
553FillDirection: FillDirection
647HorizontalAlignment: HorizontalAlignment
553SortOrder: SortOrder
647VerticalAlignment: VerticalAlignment
573ApplyLayout(): null
573SetCustomSortFunction(function: Function = nil): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
647isA(className: string): bool
647Changed(property: string)

Description

A UITableLayout lays out sibling UI elements as rows in a table. Child UI elements (the table cells) of these rows are then arranged in columns (within rows). Each cell within a row has the same height, and each cell within a column has the same width.

By changing the UIGridStyleLayout.FillDirection, sibling UI elements can act as columns instead.

When applied, a UITableLayout will take control of sibling and cell elements' GuiObject.Size and GuiObject.Position. Changing these in the Properties window is still possible will not produce any effect.

Dimensions of the cells in the resulting table are controlled by the parent UI element's dimensions. Unless UITableLayout.FillEmptySpaceColumns or UITableLayout.FillEmptySpaceRows is enabled, the cell dimensions will be that of the parent UI element (and thus tables with more than one cell extend outside of their parent).

Cells will continue to respect UISizeConstraint objects within them. In other words, setting UISizeConstraint.MinSize on UISizeConstraints within the header cells can determine the size of the rest of the cells. If UISizeConstraint.MaxSize restricts a cell's size from filling the allotted space (i.e. another row/column is wider than it), it will align to the top-left.

History 17

Members 4

FillEmptySpaceColumns

TypeDefault
boolfalse

FillEmptySpaceColumns determines whether cells' X size are set such that the entire horizontal space of the parent UI element is used. Enabling this is useful for making sure your table takes up a more easily predictable amount of horizontal space (the X-axis size of the parent UI element). It is still possible that a UISizeConstraint applied to cells will cause underflow/overflow.

When enabling this property, the column widths will be approximately equal to the parent's GuiBase2d.AbsoluteSize.X component divided by the number of columns (not accounting for padding or other factors).

History 4

FillEmptySpaceRows

TypeDefault
boolfalse

FillEmptySpaceRows determines whether cells' Y size are set such that the entire vertical space of the parent UI element is used. Enabling this is useful for making sure your table takes up a more easily predictable amount of vertical space (the Y-axis size of the parent UI element). It is still possible that a UISizeConstraint applied to cells will cause underflow/overflow.

When enabling this property, the row heights will be approximately equal to the parent's GuiBase2d.AbsoluteSize.Y component divided by the number of rows (not accounting for padding or other factors).

History 4

MajorAxis

TypeDefault
TableMajorAxisRowMajor

MajorAxis determines whether sibling UI elements are treated as rows or columns.

History 4

Padding

TypeDefault
UDim2{0, 0}, {0, 0}

Padding will position elements with extra space between them. This can be done using Scale or Offset components of UDim2. Negative values can bring elements closer together. When non-zero, the sibling UI elements may be visible between the cells contained within them.

History 4

Settings