Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ScrollBar

Inherits: Range < Control < CanvasItem < Node < Object

Inherited By: HScrollBar, VScrollBar

Abstract base class for scrollbars.

Description

Abstract base class for scrollbars, typically used to navigate through content that extends beyond the visible area of a control. Scrollbars are Range-based controls.

Properties

float

custom_step

-1.0

float

step

0.0 (overrides Range)

Theme Properties

Texture2D

decrement

Texture2D

decrement_highlight

Texture2D

decrement_pressed

Texture2D

increment

Texture2D

increment_highlight

Texture2D

increment_pressed

StyleBox

grabber

StyleBox

grabber_highlight

StyleBox

grabber_pressed

StyleBox

scroll

StyleBox

scroll_focus


Signals

scrolling ( )

Emitted when the scrollbar is being scrolled.


Property Descriptions

float custom_step = -1.0

  • void set_custom_step ( float value )

  • float get_custom_step ( )

Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the ScrollBar is focused.


Theme Property Descriptions

Texture2D decrement

Icon used as a button to scroll the ScrollBar left/up. Supports custom step using the custom_step property.


Texture2D decrement_highlight

Displayed when the mouse cursor hovers over the decrement button.