Description
Inserts a target into the current position in a RichTextEdit control. The text in the inserted target will not be displayed in the control.
Applies to
RichTextEdit controls
Syntax
rtename.TargetInsert (string name, boolean deletable)
Argument |
Description |
---|---|
rtename |
The name of the RichTextEdit control in which you want to insert a target into the current position |
name |
The name of the target to be inserted. You can insert multiple targets with the same name. Name is case sensitive. |
deletable |
A boolean specifying whether the inserted target can be deleted. Note: This argument specifies whether the end users can delete the target in RichTextEdit controls instead of using the TargetDelete function. The TargetDelete function can delete the target no matter what value the deletable argument is set to. |
Return value
Long.
Returns a target ID greater than 0 if the target was successfully inserted and -1 if an error occurs. If any argument's value is null, returns null.
Examples
This example inserts a target called "Test" and the target cannot be deleted in the RichTextEdit control by the end users:
long ll_rtn ll_rtn = rte_1.TargetInsert("Test",false)
See also