FGL_DIALOG_SETSELECTION()

Selects the text in the current field.

Syntax

FGL_DIALOG_SETSELECTION(
   cursor INTEGER,
   end INTEGER )
  1. cursor defines the edit cursor position, using byte length semantics.
  2. end defines the selection end position, using byte length semantics.

Usage

A call to FGL_DIALOG_SETSELECTION(cursor, end) sets the text selection in the current form field. The cursor parameter defines the character position of the edit cursor (equivalent to FGL_DIALOG_GETCURSOR() position), while end defines the character position of the end of the text selection (equivalent to FGL_DIALOG_GETSELECTIONEND() position).

Important: When using byte length semantics, the positions are expressed in bytes. When using char length semantics, the unit is characters. This is matters when using a multibyte locale such as UTF-8.

cursor can be lower, greater or equal to end.

This function has only an effect when staying in the current field, it should not be called in an AFTER FIELD or AFTER ROW for example.