PDFium Component Docs

Visible property

Component: TPdfView  ·  Unit: PDFium
Shows or hides the PDF viewer.

Syntax

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

Description

Setting Visible := False uklanja preglednik sa zaslona bez uništavanja; temeljni PDFium dokument, trenutna stranica, faktor zumiranja i stanje odabira su svi očuvani. Kada se svojstvo vrati na True the cached state is re-displayed immediately and a repaint is queued automatically.

Hiding the viewer is the canonical way to swap between alternative document views (for example a thumbnail-only mode and the full reader) without recreating the component. Because PDFium page handles are kept open while hidden, the user can toggle quickly between views with no reload delay.

Visibility also propagates through container controls: if the parent panel is invisible, the viewer is invisible regardless of its own setting. The framework still raises OnShow / OnHide notifications on the form so application code can synchronise toolbars accordingly.

Remarks

Example

// Toggle between thumbnail mode and full reader on a button click
procedure TForm1.btnToggleViewClick(Sender: TObject);
begin
  ThumbnailGrid.Visible := PdfView1.Visible;
  PdfView1.Visible := not PdfView1.Visible;
  if PdfView1.Visible then
    PdfView1.SetFocus;
end;

See Also

Enabled, Active, AsyncRendering, Align