[Solved] UMG Child not stretching to fill horizontal box

Hi,

I am trying to add 7 buttons to a horizontal box on widget construct by using Add Child node. The problem is that these buttons do not stretch to fill the whole horizontal box. If I add a button manually in the UMG I can set “Size” from “Auto” to “Fill” to stretch them but since I am adding these buttons on construct as children there is no way (that I know of) on how to make them fill the panel. I bet there is a simple solution to this… I have attached an image. Help is appreciated!

SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)  // add this 
.AutoWidth()                     // and let this slot's width == inner button's width
.Padding(0.0f, 0.0f, 2.0f, 0.0f)
[
	SNew(SButton)
]
	
+SHorizontalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Fill)         // then let this fulfill all the rest width
[
	SNew(SButton)
]

If u wanna 1 HorizontalBox contains 2 button, one button has a small width, and another fulfill the rest spaces, u can try this.