Slider

A slider bar for selecting numerical value.

Modulerequire("yue.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

getvalue()

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.