Slider (슬라이더) Widget Control
This page lists the Widget Control (Property · Method · Event) you use to control the Slider widget from a script. For an introduction to the widget and how to use it, visit Slider.
In the examples below, sliderID is the name (ID) you assigned to the Slider widget on the canvas. In a script, access members as widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
onChanged | Event | onChanged = (value) => { ... } | Runs when you drag the handle and the value changes |
onChangeStart | Event | onChangeStart = (value) => { ... } | Runs when the drag starts — not supported in the current version. |
onChangeEnd | Event | onChangeEnd = (value) => { ... } | Runs when the drag ends — not supported in the current version. |
Property
Not applicable — the Slider widget has no script-only Property. In a script, read and write its value with the common Widget Control below (getProperty / setProperty).
Method
Not applicable — the Slider widget has no dedicated Method. Use the common Widget Control below.
Event
onChanged
Runs continuously as you drag the handle and the slider value changes. Assign the behavior you want to run as a callback function.
- Kind: Event
- Parameters:
value- the new slider value (a number betweenminandmax) - Returns: None
Example
sliderID.onChanged = (value) => {
// value: the new slider value
console.log(value);
};
onChangeStart
Assign a callback with the behavior you want to run when the handle drag starts.
- Kind: Event
- Parameters:
value- the slider value at the moment the drag starts - Returns: None
Not supported in the current version (planned for a future update). It appears in the Studio Event list, but the callback you assign doesn't run in the current version. Handle value changes during a drag with onChanged.
onChangeEnd
Assign a callback with the behavior you want to run when the handle drag ends.
- Kind: Event
- Parameters:
value- the slider value at the moment the drag ends - Returns: None
Not supported in the current version (planned for a future update). It appears in the Studio Event list, but the callback you assign doesn't run in the current version.
Common Widget Control (all widgets)
Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).