How to add a child to parent on Widget?

Hi everyone,

I would like to know if it’s possible to add child to a parent in a widget dinamycally.
That is, when I open the widget by pressing a key, if I press again that key, I generate another child under the first and so on.
But I need one more thing, it is that this child has to be the same as the first one.

Is it possible to do that?

Thanks for your help TuXsOrDs, this helped me a lot!
I’ll mark this question as resolved! :slight_smile:

203255-part+one.png

You need to enter your widget blueprint and make the component you want to be the parent set to “is variable” like in the picture above.

Then you have to go into the event graph of your widget and (if you want) create a custom event to trigger the add child (The reason I say custom event is because it can be executed from other blueprints) and to add a child to the parent you use the node “add child” like in the picture above. when you have that node you need to make another widget to have it create in your parent. (NOTE: your component must be able to accept more than one child or else it wont create the new child)

1 Like