OnTextEdit

Forms, interaction

Description

Occurs before the transient value of the active edit changes through a selection replacement

The callback receives the edit kind, the UTF-16 selection range, the selected text and a mutable replacement string, and it fires after the Widget /K keystroke action has been dispatched and accepted

ReplacementText keystroke action has been dispatched and accepted Modifying Allow rewrites the text that will be inserted, and setting False to

The replacement is clamped to the field maximum length at complete grapheme boundaries after the callback returns

Declaration

property OnTextEdit: TPDFlibFormSessionTextEditEvent;

Handler parameters

SenderSession performing the edit
FieldIndexBase field being edited
EditKindKind of pending edit, one of fekReplaceSelection, fekCutSelection or fekPasteText
SelectionStartZero-based UTF-16 start of the normalised selection
SelectionLengthUTF-16 length of the normalised selection
SelectedTextText currently covered by the selection
ReplacementTextMutable text about to replace the selection
AllowVeto flag, preset to True and set to False for an atomic rejection

See also

ReplaceSelection, CutSelection, PasteText, TPDFlibFormEditKind, OnAction, ApplySelectionEdit