Download

C++ Widget. How can I access the Slot's Padding instead of the Content's Padding?

I’ve included a screenshot below. I can access the lower section in C++ (with the blue check) but not the upper section (with the red x).

This is a Border (called messageBackground) inside a SizeBox.

For reference, the content padding can be accessed like this:
messageBackground->SetPadding(FMargin(100,10,10,10));

I just can’t figure out how to access the Padding of the Slot itself. I’ve tried going through the SizeBox, but couldn’t find anything.

This should work out fine:

USizeBoxSlot* MySizeBoxSlot = CastChecked<USizeBoxSlot>(MySizeBox->GetSlots()[0]); MySizeBoxSlot->SetPadding(FMargin(100,10,10,10));

You’re my hero. This works perfectly. Thank you so much.