PDFium Component Docs

FormCanUndo method

Component: TPdfView  ·  Unit: PDFium
Reports whether the focused AcroForm widget has at least one edit to undo

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