How to set widget added at runtime to fill container?

Hi, I have this widget with nothing but a button and a text, that I’m adding to a horizontal box of another widget, at runtime.

How can i make it to fill that horizontal box Thanks.

When adding the widget to the HBox, it should return the Slot reference. If you have the widget ref and need the slot, use GetSlot node.

From the Slot ref, call SetHorizontalAlignment(or SetVerticalAlignment if thats your need) to ‘Fill’.

Yea, what @Countsie said.

The node names are a bit different but I couldn’t recite them from the top of my head either.

1 Like