Collapsed view doesn't work for widgets in UE5

When setting a list item’s visibility to “collapsed” it still takes up space in the layout.

I’m building a quest notification system which flashes a widget whenever you receive or complete a quest.

All widgets are created on begin play and added to a list.

When an event dispatcher calls the “QuestLogUpdated” event, the widget’s visibility changes to “not hit testable” so that the animation is visibile and then sets it to “collapsed” when the animation is over, however the collapsed item still takes space in the list.

Can someone please help me as this is driving me crazy!

Thanks

Hey in case you haven’t figured it out by now, what do your animation and widget hierarchy look like?

I had a similar issue with horizontal boxes which I was just able to solve now.

It’s simply the case of using two of them instead of one. The first horizontal box covered the space I want the widgets to be centred around on screen. The second horizontal box contains my widgets.

First Horizontal Box

Second Horizontal Box


By setting the second horizontal box to fill and centred, now whenever my widgets are collapsed, they will always use up the free layout space.

Should be the same sort of situation with your layout and vertical boxes, hopefully this helps!