Skip to main content

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.

info

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 ControlKindSignatureDescription
onChangedEventonChanged = (value) => { ... }Runs when you drag the handle and the value changes
onChangeStartEventonChangeStart = (value) => { ... }Runs when the drag starts — not supported in the current version.
onChangeEndEventonChangeEnd = (value) => { ... }Runs when the drag ends — not supported in the current version.

Property

info

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

info

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 between min and max)
  • 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
warning

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
warning

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)

note

Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).