Anyone can tell me , how can I to reset a stepper widget to the initial status?

As the title.

Hi @harveykky,

This can be done with the “object:setValue()” function. Note that the value passed will not adhere to the stepper’s minimum or maximum value. For example, if the stepper has a maximum value of 10 and you pass 20 as the value parameter, the stepper’s value will be 20. Thus, you should only pass in a value integer that is within range of your stepper’s minimum and maximum values, if defined.

[lua]

myStepper:setValue( 5 )

[/lua]

Take care,

Brent

P.S. - for some reason, this function is not linked up in the documentation. I’ll fix that shortly.

Hi @harveykky,

This can be done with the “object:setValue()” function. Note that the value passed will not adhere to the stepper’s minimum or maximum value. For example, if the stepper has a maximum value of 10 and you pass 20 as the value parameter, the stepper’s value will be 20. Thus, you should only pass in a value integer that is within range of your stepper’s minimum and maximum values, if defined.

[lua]

myStepper:setValue( 5 )

[/lua]

Take care,

Brent

P.S. - for some reason, this function is not linked up in the documentation. I’ll fix that shortly.