TextFieldInsert

Description

Inserts a text field into the current position in a RichTextEdit control. A text field contains a piece of text that can be tagged with specific data.

Applies to

RichTextEdit controls

Syntax

rtename.TextFieldInsert (string text)

Argument

Description

rtename

The name of the RichTextEdit control into which you want to insert a text field into the current position

text

The text of the text field that displays in the control


Return value

Integer.

Returns a value greater than 0 if it succeeds and this value represents the unique ID of the text field that was successfully inserted. Returns -1 if an error occurs. If any argument's value is null, returns null.

Failure occurs if multiple text fields are inserted in the same place.

Examples

This example inserts a text field with a text value "Test" in the RichTextEdit rte_1:

integer li_rtn
li_rtn= rte_1.TextFieldInsert("Test")

See also

TextFieldSetText

TextFieldSetTypeAndData

TextFieldGetType

TextFieldGetText

TextFieldGetTypeData