Cicode Programming Reference > Cicode Function Categories > Trend Functions > TrnSetCursorPos

TrnSetCursorPos

Moves the trend cursor to a specified x-axis point, offset from the trend cursor origin. If the trend cursor is disabled, this function enables it. If the position is outside of the trend frame, it sets the trend cursor to half of the frame.

Syntax

TrnSetCursorPos(nAN, Position)

AN:

The AN where the trend is located. Set to -1 for all trends on the current page.

Position:

The x-axis point at which to position the trend cursor, offset from the trend cursor origin.

Return Value

0 (zero) if successful, otherwise an error code is returned.

Related Functions

TrnGetCursorPos, TrnSetCursor

Example

! For the trend at AN20, if the trend frame is 400 points
TrnSetCursorPos(20,0);
! Moves the trend cursor to its origin.
TrnSetCursorPos(20,200);
! Moves the trend cursor to half of its frame size (200 points).

See Also

Trend Functions

Published June 2018