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
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
autoHide | public | boolean | undefined | - |
dirty | public | boolean | true | Component.dirty |
enabled | public | boolean | true | Component.enabled |
handle | public | number | null | undefined | - |
hideDelay | public | number | undefined | - |
Methods
SetHandle()
ts
SetHandle(target): void;Parameters
| Parameter | Type |
|---|---|
target | number | Entity | null |
Returns
void