# UIGridStyleLayout

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [UILayout](https://rapi.sleaze.dev/classes/UILayout.md), [UIComponent](https://rapi.sleaze.dev/classes/UIComponent.md), [UIBase](https://rapi.sleaze.dev/classes/UIBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Subclasses: [UIGridLayout](https://rapi.sleaze.dev/classes/UIGridLayout.md), [UIListLayout](https://rapi.sleaze.dev/classes/UIListLayout.md), [UIPageLayout](https://rapi.sleaze.dev/classes/UIPageLayout.md), [UITableLayout](https://rapi.sleaze.dev/classes/UITableLayout.md)
- Tags: Not browsable, Not creatable
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/UIGridStyleLayout/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/UIGridStyleLayout

The base class for grid style UI layouts.

## Properties

### HorizontalAlignment

```luau
UIGridStyleLayout.HorizontalAlignment: Enum.HorizontalAlignment
```

- Tags: Read capabilities: UI

Determines the horizontal alignment of UI elements within the parent element.

### VerticalAlignment

```luau
UIGridStyleLayout.VerticalAlignment: Enum.VerticalAlignment
```

- Tags: Read capabilities: UI

Determines the vertical alignment of UI elements within the parent element.

### FillDirection

```luau
UIGridStyleLayout.FillDirection: Enum.FillDirection
```

- Tags: Read capabilities: UI

Determines the axis in which UI objects are laid out.

### SortOrder

```luau
UIGridStyleLayout.SortOrder: Enum.SortOrder
```

- Tags: Read capabilities: UI

Determines the order in which child UI objects are placed in a layout.

### AbsoluteContentSize

```luau
UIGridStyleLayout.AbsoluteContentSize: Vector2
```

- Tags: Read only, Thread unsafe, Read capabilities: UI

The absolute size of space being taken up by the grid layout.

## Methods

### ApplyLayout

```luau
UIGridStyleLayout:ApplyLayout()
```

- Tags: Deprecated, Capabilities: UI

**Deprecated:**

Force re-layout of sibling UI elements.

### SetCustomSortFunction

```luau
UIGridStyleLayout:SetCustomSortFunction(function: ((...any) -> ...any)? = nil)
```

- Tags: Deprecated, Capabilities: UI

**Deprecated:** This method is deprecated in favor of using other SortOrder means, such as by Name or LayoutOrder.

Sets the function used to determine the order of elements when SortOrder is set to Custom.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
