Approach 2
//Create a horizontal box and assign it to ‘ContainerHBox’
//then in a separate call insert a STextBlock within
//does NOT have same result (STextBlock only takes up 1/2 of its parent and aligned right)
szyszek, thanks for the reply but I still get the same behavior. (edited the code now to reflect that)
I feel like calling ‘ContainerHBox->AddSlot()’ adds an extra slot and thats why i’m seeing the TextBlock taking up only 1/2 of its parent and aligned to the right
I experimented with ‘ContainerHBox->Slot()…]’ but nothing appears
Sorry I didnt notice this… you add empty slot to your Container at construction time so after you call ContainerHBox->AddSlot() you have 2 slots in your container, not one. During construction +SHorizontalBox::Slot() works same as AddSlot() later on. So make it like this:
szyszek, ah that did it! Thank you! I misunderstood how SAssignNew works, I mistakenly thought it assigned the next added slot rather than how it works by creating a new one.