TargetGoto

Moves the cursor to a specified target in a RichTextEdit control.

To jump to a specified target

Use

By the target ID

Syntax 1

By the target name

Syntax 2


Syntax 1: For jumping to a specified target by the target ID

Description

Moves the cursor to a specified target by the target ID in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.TargetGoto (long id)

Argument

Description

rtename

The name of the RichTextEdit control in which you want to move the cursor to a specified target by the target ID

id

The ID of the target that the cursor jumps to


Return value

Integer.

Returns 1 for success and -1 for failure. If any argument's value is null, returns null.

Examples

This example moves the cursor to a specified target by the target ID in the RichTextEdit rte_1:

integer li_rtn
li_rtn = rte_1.TargetGoto(8)

See also

TargetInsert

TargetNext

Syntax 2: For jumping to a specified target by the target name

Description

Moves the cursor to a specified target by the target name in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.TargetGoto (string name)

Argument

Description

rtename

The name of the RichTextEdit control in which you want to move the cursor to a specified target by the target name

name

The name of the target that the cursor jumps to. If there are multiple targets with the same name, the cursor will only jump to the first target. Name is case-sensitive.


Return value

Integer.

Returns 1 for success and -1 for failure. If any argument's value is null, returns null.

Examples

This example moves the cursor to a specified target by the target name in the RichTextEdit rte_1:

integer li_rtn
li_rtn = rte_1.TargetGoto("Report")

See also

TargetInsert

TargetNext