Skip to content

Class: ScrollbarComponent ​

A scroll position readout (Cocos's ScrollBar): the host is the track, handle (a child) is sized to the visible share of the content and moved to the scroll position. A ScrollView drives it through its horizontalScrollbar / verticalScrollbar fields. Not draggable.

autoHide fades the track in while scrolling and out hideDelay seconds after — it needs a UIOpacity on the track (added with the component in the editor).

Extends ​

Constructors ​

Constructor ​

ts
new ScrollbarComponent(): ScrollbarComponent;

Returns ​

ScrollbarComponent

Inherited from ​

Component.constructor

Properties ​

PropertyModifierTypeDefault valueInherited from
autoHidepublicbooleanundefined-
dirtypublicbooleantrueComponent.dirty
enabledpublicbooleantrueComponent.enabled
handlepublicnumber | nullundefined-
hideDelaypublicnumberundefined-

Methods ​

SetHandle() ​

ts
SetHandle(target): void;

Parameters ​

ParameterType
targetnumber | Entity | null

Returns ​

void

© 2026 PlayAdGentic