# Creating / Spawning things in a widget.

**URL:** <https://forums.unrealengine.com/t/creating-spawning-things-in-a-widget/227542>\
**Category:** Editor Scripting\
**Tags:** unreal-engine, UE4-26\
**Created:** [May 3, 2021, 3:56am UTC](https://forums.unrealengine.com/t/creating-spawning-things-in-a-widget/227542 "2021-05-03T03:56:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavota](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xavota](https://forums.unrealengine.com/u/Xavota)\
**Post date:** [May 3, 2021, 3:56am UTC](https://forums.unrealengine.com/t/creating-spawning-things-in-a-widget/227542/1 "2021-05-03T03:56:00Z")

</div>

I’m trying to create a dynamic inventory, with bags of different sizes, so the number of available slots changes with every new bag, but I’m having trouble with creating those slots inside the widget at runtime. I can’t seem to find the node to do that. I have been looking in other forum topics, on unreal’s documentation but haven’t found what I need.

Does anyone know if what I’m trying to do is possible and the way it is done?

I’m using Unreal 4.26 with blueprints, but I would also like an answer for C++.

---

<div class="post-metadata">

**Author:** ![NotSoAccurateNo1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NotSoAccurateNo1](https://forums.unrealengine.com/u/NotSoAccurateNo1)\
**Post date:** [May 4, 2021, 7:18pm UTC](https://forums.unrealengine.com/t/creating-spawning-things-in-a-widget/227542/2 "2021-05-04T19:18:46Z")

</div>

> [@Adding Dynamic Child Objects to Widgets](https://forums.unrealengine.com/t/adding-dynamic-child-objects-to-widgets/75282/2):
>
> Yes you can. But you can only add entire widgets dynamically, not create widget components (the stuff in the list in the Designer view). For example, if you want to dynamically add text boxes to a vertical box: Create a widget and put a Text Box in it. This will be the widget that you create dynamically later. In the widget that contains the Vertical Box, do Create Widget and pick the widget at Step 1. Get a reference to your Vertical Box and do Add Child. Connect the output from the Create W…

try here
