The setPos method sets the new logical position of the slider and redraws the slider if required.


The arguments are:


The new logical position. A valid position is an integer value within the range of the minimum and maximum positions of the slider. If you specify a value outside this range, the position is set to the maximum or minimum position.


The redraw flag. If you specify 1, the control is redrawn with the slider at the position given by pos. If you specify 0 or omit this argument, the control is not redrawn. However, the new position is set regardless of the redraw argument.


The following example sets the slider to the maximum position, with the range of the slider already been set to 0 to 100 using the setRange method:

::method SetToMax