Better Itemlist?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Farflame

Does anybody have an information on how to create a better itemlist? I’ve tried all sorts of stuff and ran through various tutorials and I think that there’s a solution but I can’t quite get it working.

I want something similar to an itemlist, but I need the columns to be different sizes.

The best I’ve come up with at the moment is to have a small scene which is a gridcontainer containing several labels which are all set at the correct sizes. Then I have a larger gridcontainer which I can slot those into. This works correctly except for the lack of scroll bars, it just seems to scroll off the bottom of the screen.

I’ve tried adding that into an itemlist but that’s just confusing and doesn’t work.

I’m sure there’s a combination of labels in grids in grids that should somehow work but I’m struggling to get it right.

:bust_in_silhouette: Reply From: Thomas Karcher

The best I’ve come up with at the moment is […] gridcontainers [with] a larger gridcontainer which I can slot those into. This works correctly except for the lack of scroll bars

Sounds good! Now wrap this larger gridcontainer in a ScrollContainer with a suitable minimum size, and you should be fine, shouldn’t you?

Yes, thank you! I hadn’t tried the ScrollContainer, this appears to be exactly what it’s for! I love Godot, so flexible and open, although it takes some time to sink in. I suspect that with the correct use of Grids and containers I can create pretty much any style of Listbox :slight_smile:

Farflame | 2019-06-12 22:57