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.