<< Click to Display Table of Contents >>
SetCursorPos |
SetCursorPos(X, [Range])
Places the cursor of an E3Chart's Pen. The X parameter indicates in which position this cursor must be placed, similar to the behavior of moving a search cursor with the mouse pointer. This cursor is moved to the nearest position indicated by X. The Range parameter is optional and used as a validation. A cursor is only moved if a valid point is inside that interval. Any negative value indicates that the past interval must not be used. Example:
' If there is a valid point in (x = 1, y = 10)
' and another one in (x = 4, y = 20)
SetCursorPos(2) ' moves the cursor to the point (1, 10)
SetCursorPos(4) ' moves the cursor to the point (4, 20)
' When a range is used, this cursor is only moved
' if the point is inside that range.
' It does not move the cursor, because 2 is more than 0.5 units
' away from the nearest point, which is 1.
SetCursorPos(2, 0.5)
' Sends this cursor to the point (1, 10)
SetCursorPos(2, 4)
This method returns True if a cursor was moved, otherwise it returns False.