FormFieldGetEnd

Description

Gets the end position of the specified form field. The type of the form field may be FormFieldCheckBox, FormFieldComboBox, FormFieldText, and FormFieldDate.

The ending position is the character index (starting at 1) of the last character of the form field in the RichTextEdit control. If there are new line characters in the content, each new line character is counted as one character too. If the RichTextEdit control contains header and footer, the character indexes of the header, footer and main content are accumulated separately.

Applies to

RichTextEdit control

Syntax

rtename.FormFieldGetEnd(integer fieldID)

Argument

Description

fieldID

The unique ID assigned to the form field.


Return value

Integer.

Returns the ending position of the form field relative to the content in the RichTextEdit control. The ending position is the character index (starting at 1) of the last character of the form field in the RichTextEdit control. If there are new line characters in the content, each new line character is counted as one character too. If the RichTextEdit control contains header and footer, the character indexes of the header, footer and main content are accumulated separately.

Returns -1 if an error occurs. Returns -2 if the fieldID is non-existent, illegal, or not of the required type. If any argument's value is null, returns null.

Examples

This example gets the ending position of the specified form field.

integer li_formid,li_rtn

li_formid = rte_1.FormTextFieldInsert("Test!")
li_rtn = rte_1.FormFieldGetEnd(li_formid)