SetEditValue

Forms, interaction, edit history

Description

Replaces the whole transient value of the active edit with a caller-supplied string

For single-line or multiline text fields with a configured maximum length the value is truncated at a complete extended grapheme boundary, so no surrogate pair or combining sequence is divided

The change updates DisplayValue, clamps the directed selection into the new value, recomputes Modified and records one whole-value delta entry for undo

Declaration

function SetEditValue(const NewValue: WideString): Integer;

Parameters

NewValueReplacement transient value, clamped to the field maximum length when one is configured

Return value

Returns 1 when the value was stored and 0 when no edit is active or the session is applying an edit, history step or commit

Example

Session.BeginEdit(FieldIndex);
Session.SetEditValue('New content');

See also

EditValue, RecordEditHistory, ClampTextLength, BeginEdit, CommitEdit