UMG Uniform Grid Construct

I wanted to construct an button-inventory out of an array. It works for scrollbox and vertical box, he constructs as many buttons as i have items in the inventory. but if i try it with uniform grid box he puts the buttons above eachother instead of next to each other in rows. How to solve it?

Thanks

Hi MajekPL,

To get the buttons in the Grid Panel to align horizontally, you will need to have at least two buttons in the panel, then select one to see its details. In the button’s details panel, you will see the “Layout” menu at the bottom. In the Layout, there are “Row” and “Column” variables for the button that let you place it in the grid. If you make one button “Row 0, Column 0” and make the other “Row 0, Column 1” then they will be side-by-side. You can also use the arrow buttons to move elements around the grid.

Let me know if that helps.

Nono, what i mean is my grid box is a variable. And i create other widget-buttons ingame for each item i collect or i remove them. So i cant move buttons arround in the editor because they just get created ingame. Hope i could explain it im not a native english speaker. Below there is my BP code. If i chose a scrollbox he is creating a list of buttons but in uniform grid it somehow doesnt rly work.

Thanks for answering!

If you grab the output of the add child node and cast this to a UniformGridSlot, from there you can set the row and column id of the item (as in the designer), so with the array index you can create you grid dynamically.

This is what i searched for. Thanks alot!!