SetPosition Method (Scale ScrollBar)


Scale and ScrollBar.


Sets the position of the scroll bar or scale.


object.SetPosition (nPosition)
Variable Description
nPosition The internal numeric value of the position to move to. INTEGER or REAL.


SetPosition sets the position of the scroll bar to the internal value nPosition. If the scroll bar or scale cannot be set to that position, Silk Test Classic raises the exception E_POS_NOT_REACHABLE.

For scroll bars, the position must be an INTEGER. For scales, the position can be an INTEGER or a REAL.

For scroll bars, the horizontal and vertical amount is linked to the scrollbar step size. When you click the scrollbar arrows, the scrollbar is incremented or decremented by the step size. If the horizontal or vertical amount that you specify is not divisible by the step size, the closest step value is used. For example, if the step size is 5 and you specify 9, the scrollbar goes to 10. If you specify 6, the scrollbar goes to 5.


Open.Files.VScrollBar.SetPosition (5)