How to add button in to vertical box dynamically?

Hi, guys.

This pictures are my game screenshot.

Each pawns has their own widget object, and each widget has different information.

One of them, each widget has a different kinds and different number of skill text and buttons.

How to add button into vertical box in constructor?

This is the way to go. I’ll just add that you can run it in a loop and expose variables on spawn. This will allow you to customise the newly spawned widgets.

I’m sorry. I think I didn’t write enough about my problems.
My widget have some empty vertical boxes.
And I want to add some text or buttons and click on event of that buttons when i spawn widget during game.
I tried upside way, but widget cannot cast to button or text box.
It couldn’t work when I use editable text box or text block too.

My question is, “How to add text box or button as a child of vertical box dynamically”

maybe you mean this :slight_smile:
UMG default widget are not UserWidget, and they have to be constructed as all other objects :stuck_out_tongue:

1 Like