PDFium Component Docs

FormCanUndo metóda

Component: TPdfView  ·  Unit: PDFium
Hlási, či má zameraný widget AcroForm aspoň jednu zmenu, ktorú možno vrátiť späť

Syntax

function FormCanUndo: Boolean;

Description

FormCanUndo wraps PDFium's FORM_CanUndo. It returns True when the FOCUSED AcroForm widget has at least one edit in its undo history that FormUndo could roll back, and False otherwise.

Returns False when the view is inactive, the document has no AcroForm, or no widget is focused — matching the contract of the other five form-edit helpers.

The natural use is as the Enabled-state expression for an Undo menu item, toolbar button, or context-menu entry.

Remarks

Example

procedure TForm1.EditMenuPopup(Sender: TObject);
begin
  miUndo.Enabled := PdfView1.FormCanUndo;
  miRedo.Enabled := PdfView1.FormCanRedo;
end;

See Also

FormUndo, FormCanRedo, FormRedo