ScrollBar of ScrollContainer always on

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?

It doesn’t seem to be possible in 3.6.
In 4.x it’s as simple as changing the scroll mode:

1 Like

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

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