How to have a scrollable ListView when wrapping in a Vertical Box?

I am trying to setup a basic list of screen resolutions that a player would be able to scroll through and select from to learn some UI basics.
I have my button setup such that it has a list of screen resolutions. And during the construction, I take each resolution as a string, and add it as a listItem to my list.

This part works great, and I can see all resolutions in the list view during testing.

HOWEVER!
The list view does not have a scroll bar when I wrap the list in a vertical box, despite it showing that it should?


vs in game:

How can I get my list of items to use this scroll wheel in game? For reference, here is my full screenshot, with the widget hierarchy, and what I think are relevant list settings:

Many thanks in advance!

Hi there,

I suspect this is because both your list and your vertical box are set to vertical aliment “fill”.
The box stretches to fill the screen and the list inside stretches to fill the box.

Can you try this instead:

I have just tried to mess with this setting, and it was keeping the same behavior. Of note, when I toggle the between ‘auto’ and ‘fill’, the bar disappears in the preview for the ‘auto’, which makes sense.

I will keep playing around with this, but I think the issue might be elsewhere? If you have any other ideas let me know and I can give it a shot

Have you tried using a scroll box?

I had tried to use a scroll box instead, and I was getting the same behavior, but I am not very familiar with that piece, so I might have made an error there

I have figured it out. Allow me to break it down for anyone who comes along in the future.
Basically, this widget was (is) a building block that I plan to reuse. That fact is what ended up hurting me here.

To make a longer story short, the issue is that despite a size box, if you put this widget onto a different widget, it will fill the space given, unless you have something present that ‘blocks’ it to limit the space.

The solution? Something invisible that sits and the bottom of the container that works solely to enforce the space restriction…

This configuration allowed the editor UI, and what shows up when I add this widget elsewhere, to match..

Hope this helps someone out there, and thank you to those who gave me ideas to run with that led me here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.