I’m at my wits end. What I’m trying to do is pretty straightforward and there are many tutorials on the topic (and code/BP snippets). I’m trying to go over the array and display its item in the ScrollBox. This is the BP, that is doing the adding to ScrollBox.
As you can see, I’m constructing the NewWidgetBlueprint, which is a User Widget with one Text widget. You can see the hierarchy here:
When there is one item in the array, everything looks good, there is one item in the ScrollBox:
The problem is, when there are multiple items in the array. The visuals of the NewWidgetBlueprint are all placed on the first line within the ScrollBox. The items are definitely in the ScrollBox as there is a scrollbar visible. But they are all displayed on the first line (you can see that they overlap each other, as the font appears to be much bolder that it is in the previous image):
I have tried to put VerticalBox, WrapPanel and all sorts of ordering widgets to ScrollBox and tried to add the NewWidgetBlueprint there, but the result is still the same.
A rookie mistake :). In case, somebody has the same problem:
You are probably updating your ScrollBox in EventTick, which doesn’t leave UE time to process and properly place you child items within the ScrollBox. You should use SetTimerByEvent and then do the update of ScrollBox. In other words, do this:
Also, is there a reason to do what you do 10x per second? Perhaps it would make sense to adopt an Event Driven approach and run it only once - or whenever you need it.
Thank you for your response and explanation, it helped me a lot. I’m not using event driven logic because I haven’t found a way how to monitor changes to an array (in the widget I’m displaying consists of several arrays). Theoretically I could bind the widget update to an event, that would be fired every time an array would be updated. But… I haven’t found a clear way how to do that.