PDFiumVCL Docs

Enabled property

Component: TPdfView  ·  Unit: PDFium
Controls whether the PDF viewer accepts user input from the mouse and keyboard.

Syntax

property Enabled: Boolean; // published, inherited from TControl

Description

When Enabled is True the viewer responds to mouse clicks, drags, the mouse wheel and keyboard navigation. Setting it to False blocks all user input — mouse clicks no longer change the selection or scroll position, keyboard shortcuts no longer move pages, and form field widgets stop receiving events — while the page is still rendered normally.

This is the canonical "read-only preview" mode: the document remains visible so the user can see the content, but they cannot accidentally scroll past it, alter form fields or pick up a text selection. Use it while a long operation is running (saving, printing, exporting) to keep the UI predictable, then re-enable the viewer when the work finishes.

The disabled state also propagates from the parent — if the parent panel becomes disabled, the viewer is treated as disabled for input purposes even if its own Enabled is True. Visual appearance of disabled content depends on the host theme; some VCL themes dim the control while others leave the appearance unchanged.

Remarks

Example

// Disable the viewer while a long export is in progress
procedure TForm1.btnExportClick(Sender: TObject);
begin
  PdfView1.Enabled := False;
  try
    ExportAllPagesToImages(PdfView1.Pdf, 'C:\out\');
  finally
    PdfView1.Enabled := True;
    PdfView1.SetFocus;
  end;
end;

See Also

Visible, AllowUserPageChange, AllowUserTextSelection, TabStop