PDFiumVCL 文档

OnResize event

此 API 条目保留标识符、签名、代码块和 PDF 术语的原始形式。
Component: TPdfView  ·  Unit: PDFium
Fired whenever the control's client area changes size.

Syntax

property OnResize: TNotifyEvent;

Description

Fired whenever the control's client area changes size. The Sender parameter references the TPdfView instance that raised the event, so a single handler can serve multiple views by inspecting Sender.

Typical uses include: re-fit the page (e.g. invoke Zoom(pfmFitWidth)) or reposition floating toolbars. Because the handler runs on the VCL main thread, you can update form controls and call other VCL APIs directly.

Handlers must return quickly — PDFium rendering and form filling occur on the same thread, and any delay here postpones the next page repaint.

Remarks

Example

procedure TForm1.PdfViewOnResize(Sender: TObject);
begin
  // re-fit the page (e.g. invoke Zoom(pfmFitWidth)) or reposition floating toolbars
  Caption := Format('OnResize on page %d', [PdfView1.PageNumber]);
end;

See Also

OnClick, OnPageChange, OnMouseDown, PageNumber