InputFieldLocate

Description

Locates an input field in a RichTextEdit control and moves the insertion point there.

Applies to

RichTextEdit controls

Syntax

rtename.InputFieldLocate ( location {, inputfieldname } )

Argument

Description

rtename

The name of the RichTextEdit control in which you want to locate an input field.

location

A value of the Location enumerated datatype that specifies the occurrence of the input field you want to locate. Values are:

  • First! – The first occurrence in the document of inputfieldname, or if no name is specified, the first input field in the document

  • Last! – The last occurrence in the document of inputfieldname, or if no name is specified, the last input field in the document

  • Next! – The occurrence of inputfieldname that is after the insertion point, or if no name is specified, the next input field of any name after the insertion point

  • Prior! – The occurrence of inputfieldname before the insertion point, or if no name is specified, the next input field of any name before the insertion point

inputfieldname

A string whose value is the name of the input field you want to locate. If there are multiple occurrences of inputfieldname in the control, location specifies the one to be located.

Returns

String. Returns the name of the input field it located if it succeeds. InputFieldLocate returns an empty string if no matching input field is found or if an error occurs. If any argument is null, InputFieldLocate returns null.

Usage

There can be several input fields with the same name. Fields of a given name all have the same data value.

Examples

Example 1

This example locates the next input field after the insertion point. If found, ls_name is set to the name of the input field:

string ls_name

ls_name = rte_1.InputFieldLocate(Next!)

Example 2

This example locates the last input field in the document:

string ls_name

ls_name = rte_1.InputFieldLocate(Last!)

Example 3

This example locates the last occurrence in the document of the input field named address. If found, ls_name is set to the value "address":

string ls_name

ls_name = rte_1.InputFieldLocate(Last!, "address")

See also