# UIGridStyleLayout

UIGridStyleLayout : `Instance`

## Overview

UI 요소들을 격자 또는 리스트 형태로 자동 배치하기 위한 레이아웃의 기반 클래스입니다.

UIGridStyleLayout은 **클라이언트 환경**에서만 제어할 수 있습니다.

## Properties

### AbsoluteContentSize

`Vector2`

레이아웃 내부의 요소들이 실제로 차지하는 전체 공간을 나타내는 읽기 전용 속성으로, 요소 간 간격(Padding)까지 포함한 실측 크기를 의미합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local UIListLayout = Frame:WaitForChild("UIListLayout")

print(UIListLayout.AbsoluteContentSize)
```

### FillDirection

`Enum.FillDirection`

UI 요소들이 나열되는 기본 축을 지정합니다.

가로 방향(Horizontal)일 경우 요소들이 좌→우 순서로 나열되고, 세로 방향(Vertical)일 경우 위→아래 흐름으로 배열됩니다.

정방향이 아닌 거꾸로 정렬하고 싶을 때는 FillDirection만으로는 제어할 수 없으며, LayoutOrder 기반 정렬을 이용해 순서를 반전시키는 방식으로 구현해야 합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local UIListLayout = Frame:WaitForChild("UIListLayout")

UIListLayout.FillDirection = Enum.FillDirection.Horizontal
```

### HorizontalAlignment

`Enum.HorizontalAlignment`

UI 요소들이 부모 컨테이너 안에서 수평 방향으로 어떤 기준점에 맞춰 배치될지를 결정하는 속성입니다.

텍스트의 가로 정렬(TextXAlignment)과 유사하게, 요소들의 묶음을 왼쪽 정렬, 가운데 정렬, 오른쪽 정렬 중 어떤 방식으로 배치할지 지정할 수 있습니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local UIListLayout = Frame:WaitForChild("UIListLayout")

UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
```

### SortOrder

`Enum.SortOrder`

레이아웃이 여러 UI 요소를 화면에 나열할 때 어떤 규칙으로 순서를 정할지를 지정합니다.

LayoutOrder은 각 요소가 가진 LayoutOrder 숫자를 기준으로 가장 작은 값부터 순서대로 배치됩니다. 같은 숫자를 가진 요소가 둘 이상이면, 부모에 더 일찍 추가된 요소가 먼저 위치합니다.

Name은 각 요소의 Name 값을 문자·숫자 조합 순서로 정렬하여 배치합니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local UIListLayout = Frame:WaitForChild("UIListLayout")

UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
```

### VerticalAlignment

`Enum.VerticalAlignment`

UI 요소들이 부모 컨테이너 안에서 수직 방향으로 어떤 기준점에 맞춰 배치될지를 결정하는 속성입니다.

텍스트의 세로 정렬(TextYAlignment)과 유사하게, 요소들의 묶음을 상단 정렬, 가운데 정렬, 하단 정렬 중 어떤 방식으로 배치할지 지정할 수 있습니다.

#### Code Samples

```lua
local ScreenGui = script.Parent
local Frame = ScreenGui:WaitForChild("Frame")
local UIListLayout = Frame:WaitForChild("UIListLayout")

UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
```

## Methods

## Events

## See also

{% content-ref url="/pages/K1g0tEWDJhh6a6E4UURk" %}
[GUI](/korean/manual/studio-manual/gui.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/korean/development/api-reference/classes/uigridstylelayout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
