# For each loop not creating and add child to widget. But the array is working.

**URL:** <https://forums.unrealengine.com/t/for-each-loop-not-creating-and-add-child-to-widget-but-the-array-is-working/1868546>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, bug-report, Blueprint, question\
**Created:** [May 23, 2024, 2:30am UTC](https://forums.unrealengine.com/t/for-each-loop-not-creating-and-add-child-to-widget-but-the-array-is-working/1868546 "2024-05-23T02:30:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [May 23, 2024, 7:45am UTC](https://forums.unrealengine.com/t/for-each-loop-not-creating-and-add-child-to-widget-but-the-array-is-working/1868546/4 "2024-05-23T07:45:15Z")

</div>

> [@ColicPizza\_4](#):
>
> you can’t create new Grid slots during run time

You can, you need to feed it column and row:

> [@Uniform Grid Panel setup](https://forums.unrealengine.com/t/uniform-grid-panel-setup/89025/2):
>
> 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: 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…

* * *

You could also use a Wrap Box which would automatically create a Grid like layout providing it exceeds container desired size.

---

_[View the full topic](https://forums.unrealengine.com/t/for-each-loop-not-creating-and-add-child-to-widget-but-the-array-is-working/1868546)._
