# Uniform Grid Panel setup

**URL:** <https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 1, 2017, 2:46pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025 "2017-04-01T14:46:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThirteenOranges](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThirteenOranges](https://forums.unrealengine.com/u/ThirteenOranges)\
**Post date:** [April 1, 2017, 2:46pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/1 "2017-04-01T14:46:34Z")

</div>

I’m setting up a grid with a dynamic number of widgits inside it, however, when using the Uniform Grid Panel, all of the widgets created and assigned as a child appear full screen and stack on top of each other, instead of appearing in a grid formation. My guess at the problem is that these child widgets are all a combo of image and text inside a Canvas Panel, which is itself full screen. Is there a way to create a panel that _isn’t_ full screen, and can still scale based on resolution?

…if not then im ok with dropping the scaling part of it for now…but still need a solution to the panel size…I think…

Has anyone else encountered the same issues or have any ideas what might be going wrong with my Grid?

Thanks.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 1, 2017, 7:41pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/2 "2017-04-01T19:41:01Z")

</div>

Welcome to the forums.

If you want a widget to have a specific size, you can place it on a canvas; in addition, this will allow you to control its position (amongst other things). Here is an example of a \*UniformGrid \*sitting on the canvas (inside a border to make it pretty). The grid widget:

 ![grid.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/0/4e097f33b70ad20589419875e8fb4d957ee40ddd.png)

When you add children to a \*UniformGrid \*you’ll need to specify which column & row they occupy. If you add children manually, you can set it up in the details panel of every child (as default they sit at [0,0] I think - so yeah, they will stack on top of one another). If you spawn them dynamically, which is your case, you’ll need to assign row & column as you populate the grid.

Here is a child widget I’m going to add to the _UniformGrid_ –\> [wGridChild]:

- padding in the widget root [wGridChild] will prevent it from touching other children
- the border will keep whatever you place inside centred, according to the alignment settings and padding

 ![childG.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/8/2584e0ccffe6dcdfa11a3e64f7b38edd7f4da3d1.png)

And this is how you can put it together, including setting up columns and rows as well as defining horizontal & vertical alignment in the \*UniformGrid’s \*slots:

 ![graph.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/7/a72330e99ff0f72b1fd4eccd2ae7123be9617c45.jpeg)

…which produced this:

![end.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/0/b0331bea01815d30fe33d8c4d93eca765c237b4a.png)

If you have any additional questions, keep them coming.

---

<div class="post-metadata">

**Author:** ![Duuhannes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Duuhannes](https://forums.unrealengine.com/u/Duuhannes)\
**Post date:** [March 25, 2018, 7:32pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/3 "2018-03-25T19:32:40Z")

</div>

Never mind, got it to work! Thank you very much!

---

<div class="post-metadata">

**Author:** ![TSUEnami](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TSUEnami](https://forums.unrealengine.com/u/TSUEnami)\
**Post date:** [June 17, 2018, 7:18am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/4 "2018-06-17T07:18:01Z")

</div>

This worked great for me. Very easy to understand. Much appreciated!

---

<div class="post-metadata">

**Author:** ![Alex.Palo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex.Palo](https://forums.unrealengine.com/u/Alex.Palo)\
**Post date:** [December 29, 2018, 2:36am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/5 "2018-12-29T02:36:57Z")

</div>

It worked for me too! Thank you very much, Everynone!

---

<div class="post-metadata">

**Author:** ![Harvard\_Black](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Harvard\_Black](https://forums.unrealengine.com/u/Harvard_Black)\
**Post date:** [February 24, 2019, 5:47am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/6 "2019-02-24T05:47:39Z")

</div>

[QUOTE="  
If you have any additional questions, keep them coming.[/QUOTE]

How do you make the items clickable? I have populated my grid with icons from a data table but I’d like to click on the icon to set a variable that can be cast out to my player character. I can’t even get hover events. Any help would be greatly appreciated as I have been all over the internet looking for answers. Thanks!

 ![Widget.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/e/eedc459f8bc48238fd9826e598b578c6394b38dc.jpeg)

---

<div class="post-metadata">

**Author:** ![sabibo67](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sabibo67](https://forums.unrealengine.com/u/sabibo67)\
**Post date:** [August 16, 2019, 3:00pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/7 "2019-08-16T15:00:13Z")

</div>

I set this up - it all works except my grid child widgets are not square, they are rectangles, even though I have them as square in the child widget blueprint. I cannot find any place that specifies what the size or shape of the child widgets are?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 16, 2019, 3:29pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/8 "2019-08-16T15:29:01Z")

</div>

> [@](#):
>
> I cannot find any place that specifies what the size or shape of the child widgets are?

There isn’t one. It’s the parent that formats the children; they conform to whatever desired size the parent has. You have 2 options:

- make the parent square and have an even number of both rows and columns, this will ensure shape uniformity as they will want to fill all available space evenly
- wrap each child with a SizeBox and apply overrides - this will force the parent to respect its children’s needs

---

<div class="post-metadata">

**Author:** ![Deemk0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deemk0](https://forums.unrealengine.com/u/Deemk0)\
**Post date:** [September 18, 2019, 4:54pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/9 "2019-09-18T16:54:46Z")

</div>

> [@Harvard Black](#):
>
> How do you make the items clickable?
> 
> ![eedc459f8bc48238fd9826e598b578c6394b38dc.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/e/eedc459f8bc48238fd9826e598b578c6394b38dc.jpeg)

To make “items clickable” inside grid, you are going to have to actually add a button inside the clickable widget, and bind an event dispatcher to it. After that when filling the grid you want to bind the custom event to it.  
You can also pass along the self reference of a clickable widget through event dispatcher to be able to access it.  
This is the example:

---

<div class="post-metadata">

**Author:** ![Gordoxgrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gordoxgrey](https://forums.unrealengine.com/u/Gordoxgrey)\
**Post date:** [November 15, 2019, 4:22am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/10 "2019-11-15T04:22:10Z")

</div>

> [@Everynone](#):
>
> Welcome to the forums.
> 
> If you want a widget to have a specific size, you can place it on a canvas; in addition, this will allow you to control its position (amongst other things). Here is an example of a \*UniformGrid \*sitting on the canvas (inside a border to make it pretty). The grid widget:
> 
> ![Annotation-20191115-121931.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/5/0756efb4c3ef34aba3495b36cee8396b05697eb6.png)
> 
> When you add children to a \*UniformGrid \*you’ll need to specify which column & row they occupy. If you add children manually, you can set it up in the details panel of every child (as default they sit at [0,0] I think - so yeah, they will stack on top of one another). If you spawn them dynamically, which is your case, you’ll need to assign row & column as you populate the grid.
> 
> Here is a child widget I’m going to add to the _UniformGrid_ –\> [wGridChild]:
> 
> - padding in the widget root [wGridChild] will prevent it from touching other children
> - the border will keep whatever you place inside centred, according to the alignment settings and padding
> 
> ![Annotation-20191115-121931.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/5/0756efb4c3ef34aba3495b36cee8396b05697eb6.png)
> 
> And this is how you can put it together, including setting up columns and rows as well as defining horizontal & vertical alignment in the \*UniformGrid’s \*slots:
> 
> ![graph.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/7/a72330e99ff0f72b1fd4eccd2ae7123be9617c45.jpeg)
> 
> …which produced this:
> 
> ![end.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/0/b0331bea01815d30fe33d8c4d93eca765c237b4a.png)
> 
> If you have any additional questions, keep them coming.

How would I go about doing the same thing but adding/removing one child widget at a time?

This is what I have currently for adding Widgets to a Grid Panel, but sizing is all out of wack, and I don’t know how to cleanly remove a widget.

![3f18409f4bd8b9f7bae76b13aedbec56ff290908.png](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 15, 2019, 7:56am UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/11 "2019-11-15T07:56:31Z")

</div>

> [@](#):
>
> and I don’t know how to cleanly remove a widget.

- what’s the trigger for widget removal
- are you removing from the end
- are you adding \*or \*inserting

But first of all, if you’re going to have an uneven and dynamic number of elements, you should consider a WrapBox - much more suited to that kind of thing as it handles the row/column automatically. Not sure what this is going to be used for so this advice my not be that great.

---

<div class="post-metadata">

**Author:** ![ImperialPhalanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ImperialPhalanx](https://forums.unrealengine.com/u/ImperialPhalanx)\
**Post date:** [July 8, 2020, 3:45pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/12 "2020-07-08T15:45:41Z")

</div>

I know this is old, but my question is, what is the node that inputs the main widget, and outputs the uniform grid? The only node I can drag off is “Slot as Uniform Grid Slot” which isn’t what I want.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 8, 2020, 7:41pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/13 "2020-07-08T19:41:26Z")

</div>

> [@ImperialPhalanx](#):
>
> I know this is old, but my question is, what is the node that inputs the main widget, and outputs the uniform grid? The only node I can drag off is “Slot as Uniform Grid Slot” which isn’t what I want.

Can you clarify? Do you mean _AddChildToUniformGrid_?

---

<div class="post-metadata">

**Author:** ![ImperialPhalanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ImperialPhalanx](https://forums.unrealengine.com/u/ImperialPhalanx)\
**Post date:** [July 9, 2020, 1:12pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/14 "2020-07-09T13:12:53Z")

</div>

> [@Everynone](#):
>
> Can you clarify? Do you mean _AddChildToUniformGrid_?

No, the node that is connected to the Target of _AddChildToUniformGrid_

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 9, 2020, 1:45pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/15 "2020-07-09T13:45:01Z")

</div>

That’s the _Uniform Grid Panel_ itself - you can see it in the very first pic I posted - called \*Uniform Grid Panel \*sitting in the border.

If your widget hosts one of those panels, you can access it first by dragging a wire from Create Widget’s Return Value and searching for it. Once you’ve accessed the panel, you can start adding children. [HR][/HR]  
If you can’t see it, ensure it’s flagged as \*isVariable \*first:

![Annotation 2020-07-09 144300.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/4/444fcd65031a2794bc9bec7735873eb5eb82c807.jpeg)

This will expose it. Some widgets are not exposed by default.

---

<div class="post-metadata">

**Author:** ![ImperialPhalanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ImperialPhalanx](https://forums.unrealengine.com/u/ImperialPhalanx)\
**Post date:** [July 9, 2020, 1:50pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/16 "2020-07-09T13:50:50Z")

</div>

Ah, that worked! Thank you!

---

<div class="post-metadata">

**Author:** ![ImperialPhalanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ImperialPhalanx](https://forums.unrealengine.com/u/ImperialPhalanx)\
**Post date:** [July 9, 2020, 3:06pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/17 "2020-07-09T15:06:34Z")

</div>

I do have a follow up, are your borders transparent? Every time I try to make a similar thing, I just have a completely filled white border from the main widget.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 9, 2020, 3:18pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/18 "2020-07-09T15:18:36Z")

</div>

Aye, force of habit. Looks like a 0,0,0 black brush with .25 alpha from here.

---

<div class="post-metadata">

**Author:** ![ImperialPhalanx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ImperialPhalanx](https://forums.unrealengine.com/u/ImperialPhalanx)\
**Post date:** [July 9, 2020, 4:36pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/19 "2020-07-09T16:36:08Z")

</div>

Hopefully final question XD

Is there a method to make the padding between all the children remain the same no matter how many columns there are? I’m just using a single row with a varying number of columns, and I want the space between all the children to be the same no matter the number of columns.

EDIT: I see a minimum children padding distance, but I also need a maximum distance, which I don’t see.

---

<div class="post-metadata">

**Author:** ![lobachevscki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lobachevscki](https://forums.unrealengine.com/u/lobachevscki)\
**Post date:** [March 22, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/20 "2021-03-22T16:20:52Z")

</div>

Hello!

Bumping this a bit.

How could I use this to populate the grid with assets selected from Content Browser in an Utility Widget Blueprint. THanks

[Next page](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025.md?page=2)
