Slider
A slider bar for selecting numerical value.
Module | require("gui") |
Type | Class |
Inherits | View |
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
Number
value
getValue()
Return the value.
Return
Number
setStep(step)
Set the step value of the slider.
Parameters
Number
step
getStep()
Return the step value of the slider.
Return
Number
setRange(min, max)
Set the range of the slider.
Parameters
Number
minNumber
max
getRange()
Return the range of the slider.
Return
[Number, Number]
Events
onValueChange(self)
Emitted when user is changing the slider.
Parameters
Slider
self
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
Slider
self