CancelEdit
Forms, interaction, edit history
Description
Discards the transient edit value and selection of a TPDFlibFormSession edit without writing anything to the field
DisplayValue is restored to OriginalValue, then the complete editing state is cleared, including the editing field index, both values, all selection positions, the cached Unicode boundary tables and the whole edit history
The call is a no-op while a commit, a selection replacement or a history replay is in progress
Declaration
procedure CancelEdit;
Example
if Session.BeginEdit(FieldIndex) = 1 then
begin
Session.PasteText('draft');
Session.CancelEdit;
end;
See also
CommitEdit, BeginEdit, Blur, ClearEditState, ClearEditHistory, EditValue, OriginalValue, TPDFlibFormSession