UVerticalBox
Inherits: UObjectBase › UObjectBaseUtility › UObject › UVisual › UWidget › UPanelWidget › UVerticalBox
#include "Components/VerticalBox.h" Description
A layout panel that automatically stacks child widgets top-to-bottom. Children resize according to their slot's fill rule (Auto or Fill).
Caveats & Gotchas
- • Fill and padding settings are on UVerticalBoxSlot, not the panel. Retrieve the slot from AddChildToVerticalBox().
- • Collapsed children are excluded from layout and take no space. Hidden children still occupy their layout slot.
Example
Add a widget that fills remaining vertical space C++
UVerticalBoxSlot* Slot = MyVerticalBox->AddChildToVerticalBox(MyWidget);
if (Slot)
{
Slot->SetSize(FSlateChildSize(ESlateSizeRule::Fill));
Slot->SetPadding(FMargin(0.f, 4.f));
} See Also
Version History
Introduced in: 4.5
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?