SetFormFieldValueAndRefresh

Form fields, viewer interaction

Description

Writes NewValue into the field, drops the cached bitmaps of the pages hosting the field so the next paint re-renders them, and fires OnFormFieldValueChanged

FieldIndex may be a widget temporary index or the base field index; read-only fields are rejected and text values longer than the field MaxLen are truncated

Syntax

Delphi

Function TPDFlibViewer.SetFormFieldValueAndRefresh(FieldIndex: Integer; Const NewValue: WideString): Integer;

Parameters

FieldIndex1-based base field index or widget temporary index
NewValueValue to store into the field

Return values

0No document is open, the field is unknown or read-only, or the write failed
1The value was stored, the affected pages were invalidated and the event fired

See also

OnFormFieldValueChanged, ToggleCheckBoxField, SetFormFieldValue, RefreshPage, TPDFlibViewer