Godot Version
Godot 3.6
Question
Is it possible to have the scroll bar of a ScrollContainer always on, even if the child of said ScrollContainer isn’t bigger?
Godot 3.6
Is it possible to have the scroll bar of a ScrollContainer always on, even if the child of said ScrollContainer isn’t bigger?
That’s a bummer… Thank you for taking the time to respond! Cheers!
You can get the scrollbar nodes by get_h_scrollbar() and get_v_scrollbar()methods.
So maybe you can connect their visibility_changed signals to a method that you can set them visible every time it’s set false.
I tried this and unfortunately the game crashes. This is the code I used: (Maybe there is something I am missing(?))
extends ScrollContainer
func _ready():
get_v_scrollbar().connect(“visibility_changed”, self, “show_scrollbar”)
func show_scrollbar():
get_v_scrollbar().visible = true
Thanks in advance ![]()
If it crashes, the console should tell you exactly what happened, so it can be debugged from there. What does it say?
Oh sorry! It doesn’t crash. It stays on the logo screen “loading” forever. So there is no output on the console.
It might be stuck in an infinite loop then