how i can make a scrollbar work

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

hello i want to scroll the content inside of a vcontainer, i want to use an scrollbar but i can not understand how to make it work

:bust_in_silhouette: Reply From: johnygames

Have you tried placing a ScrollContainer Node? The idea is that you create a ScrollContainer and give it a VBoxContainer as a child. In that VBoxContainer you place all the elements that you need. Scrolling is done automatically when you scroll with the mouse-wheel in that area. Sliders also appear on the right and on the bottom of the Container.

You said " Scrolling is done automatically " , really ? … i want this for mobile game… and yes i have a scroll container and a vbox as child

Manuel | 2019-10-14 01:08

I am not sure about the mobile version, but it should work. Does it work on PC? Do you see the scrollbars? What is the problem exactly?

johnygames | 2019-10-14 01:24

can you show me an example ? , i can see the scrollbar , something must be wrong

Manuel | 2019-10-14 02:15

Unfortunately I cannot recreate an example for mobile. But do check this github thread:

https://github.com/godotengine/godot/issues/21137

It seems that you need to implement the swipe functionality yourself.

johnygames | 2019-10-16 21:40

I have a similar issue. Just, I can’t see a scroll bar.
Node layout:

ScrollContainer
> VBoxContainer
 > Sprite2D

Amateur.game.dev. | 2021-06-07 22:06