Is it possible to sort children in a WrapBox
so its children are displayed in a certain sequence (like it’s possible with UUniformGridSlot::SetColumn/SetRow
)? I’ve tried to modify the index of the children (e.g. using ShiftChild()
), however it does not change their position.
I’ve solved this by
- Storing the children widgets of the
WrapBox
in a temporary list. - Removing all children widgets from the
WrapBox
. - Sorting the temporary list by using a value (stored inside the children widget).
- Adding all children widgets to the
WrapBox
according to the sequence of the list.
However are there different approaches that don’t require to remove + add children to the box?