Slider

A slider bar for selecting numerical value.

Modulerequire("gui")
TypeClass
InheritsView

The default range is between 0 and 100.

Class methods

create()

Create a new Slider view.

Return

Slider

Methods

setValue(value)

Set the value.

Parameters

getValue()

Return the value.

Return

Number

setStep(step)

Set the step value of the slider.

Parameters

getStep()

Return the step value of the slider.

Return

Number

setRange(min, max)

Set the range of the slider.

Parameters

getRange()

Return the range of the slider.

Return

[Number, Number]

Events

onValueChange(self)

Emitted when user is changing the slider.

Parameters

Preventable

No.

onSlidingComplete(self)

Emitted when user releases the slider.

Note that this event only emits when user was dragging the slider with mouse or trackpad, it does not emit when user was moving the slider with keyboard.

Parameters

Preventable

No.