Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnSetPenFocus

TrnSetPenFocus

Sets the focus to a specified pen. After the focus is set, the focus pen is used with other trend functions.

Syntax

TrnSetPenFocus(AN, Pen)

AN:

The AN of the chosen trend.

Pen:

The trend pen:

-4 - Make the next pen the focus pen; without skipping blank pens.

-3 - Make the previous pen the focus pen; without skipping blank pens.

-2 - Make the next pen the focus pen; skip blank pens.

-1 - Make the previous pen the focus pen; skip blank pens.

0 - Keep the current focus.

1...8 - Change Pen1. . .8 to be the focus pen.

Return Value

The old pen focus number, or -1 if an error is detected. You can call the IsError() function to get the actual error code.

Related Functions

TrnGetPenFocus

Example

System Keyboard

Key Sequence

NextPen

Command

TrnSetPenFocus(20, -2)

Comment

For the trend at AN20, make the next pen the focus pen

See Also

Trend Functions