0 votes

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.

in Engine by (73 points)

1 Answer

+1 vote
Best answer

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?

https://docs.godotengine.org/en/3.1/classes/class_scrollcontainer.html

by (1,694 points)
selected by

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 :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.