Reset

Forms, interaction, data types, document parts, variable data, document editing

TPDFlibFormSession.Reset

Clears the focus, hover, press, edit and selection state of the TPDFlibFormSession

The focused, hovered and pressed Widget indexes return to zero, the cached display value is dropped and the complete edit state including the edit history is discarded

No Widget actions are dispatched and no field values are changed, so an uncommitted edit is simply abandoned rather than committed or cancelled through CommitEdit or CancelEdit

The call is ignored while an edit, history step or commit is being applied, and AttachLibrary uses it before attaching a new library instance

Declaration

procedure Reset;

Example

Session.Reset;
Session.AttachLibrary(OtherPDF);

TPDFlibDynamicComponentSession.Reset

Restarts a TPDFlibDynamicComponentSession by replacing the current component with a fresh clone of the initial component captured when it was attached The composition count returns to zero,

Completed returns to False and the keep-together retry state including LastRetryReason and LastRequiredSlotHeight is cleared

Declaration

function TPDFlibDynamicComponentSession.Reset: Integer;

Return value

Returns 1 when the session restarted from the cloned initial component, or 0 when no initial component is available or the clone failed

See also

AttachLibrary, CancelEdit, ClearEditState, LibraryInstance, TPDFlibFormSession, TPDFlibDynamicComponentSession, AttachComponent, CloneCurrentComponent, CompositionCount