Skip to content

Commit 6df887d

Browse files
author
Roberto De Ioris
authored
Update Slate_API.md
1 parent 9a736c7 commit 6df887d

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

‎docs/Slate_API.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,41 @@ More infos on SHorizontalBox: https://api.unrealengine.com/INT/API/Runtime/Slate
388388

389389
## SGridPanel
390390

391+
This widget allows you to align children in a virtual grid. For each slot you specify the column and row and eventually how much it 'spans' horizontally and verically:
392+
393+
```python
394+
from unreal_engine import SWindow, STextBlock, SGridPanel, SBorder
395+
396+
margin = 40
397+
398+
SWindow(client_size=(512, 512), title='Slate Window')(
399+
SGridPanel()
400+
(
401+
SBorder(padding=margin)(STextBlock(text='cell0')), column=0, row=0
402+
)
403+
(
404+
SBorder(padding=margin)(STextBlock(text='cell1')), column=1, row=0
405+
)
406+
(
407+
SBorder(padding=margin)(STextBlock(text='cell2')), column=2, row=0
408+
)
409+
(
410+
SBorder(padding=margin)(STextBlock(text='cell3')), column=0, row=1
411+
)
412+
(
413+
SBorder(padding=margin)(STextBlock(text='cell4')), column=3, row=1, row_span=3
414+
)
415+
(
416+
SBorder(padding=margin)(STextBlock(text='cell5')), column=2, row=2
417+
)
418+
(
419+
SBorder(padding=margin)(STextBlock(text='cell6')), column=0, row=3, column_span=2
420+
)
421+
)
422+
```
423+
424+
![SGridPanel](https://github.com/20tab/UnrealEnginePython/raw/master/docs/screenshots/slate_SGridPanel.png)
425+
391426
## SScrollBox
392427

393428
## SButton

0 commit comments

Comments
 (0)