Topic was automatically imported from the old Question2Answer platform.
Asked By
StraightUpGruntled
How do you go about customizing the scroll bar in the scroll container. More importantly, how do you change the WIDTH of the bar! I know themes might work, but I have only used them a bit, and dont know how to use them to change the scroll container’s scroll bar size!
For Godot 3.2 onwards, you can achieve this via theme in the following way:
Edit: might work for earlier versions, not sure.
First assign a theme to your scroll container node.
Add a class item in that theme: “VScrollBar”, V Scroll Bar appears in the property menu.
Click on “V Scroll Bar” and then click on “Styles”, here you can use a stylebox type of your choice. (StyleBoxTexture glitches out for some reason when you try to assign to it).
If you choose to go with styleboxflat, click on it to change its properties, here you can set the color, border color shape etc. Here, you will also find an attribute titled: “Content Margin”. Changing parameters under Content Margin allows you to change the breadth and height of your scrollbar. You might need to broaden “scroll” width in order for mouse hover to work in accordance to the width you have in mind.