Event Construct is not being fired when the widget is out of view. Help

Hello.

I’ve got a ListView and another widget as its “element” class.

When I add elements to this ListView, there is nothing wrong going on with the first 12 elements, elements that are visible at the beginning. Event construct is firing just fine for them.

But elements after 12 that can be seen by scrolling down the listview, event construct is not being fired until they are visible on screen.

How can I make the event construct fire immediately after adding them to the listview?

Using UE 5.0.2

Thank you in advance.

This is likely not going to be possible without breaking a fundamental benefit of a listview which is that it only instantiates the widget objects which are required to display. This makes it so you can have a thousand or so list items but only use enough memory and cpu cycles to display/manage what is visible. You might need to re-think how you’re using them. I imagine you have something important happening on construct so you’re wanting it to execute regardless of whether or not the list item is in view. You might need to consider moving that sort of stuff elsewhere.

EDIT: Out of curiosity, have you tested to see when OnInitialized fires? I’m aware there are 3 construction/initialization events that are available “pre-construct”, “construct” and “initialized”. I doubt pre-construct will give you the desired behavior but there’s an off chance initialized might.

1 Like