Docs PDFiumVCL

OnMouseMove event

Questa voce API conserva identificatori, firme, blocchi di codice e termini PDF nella forma originale.
Component: TPdfView  ·  Unit: PDFium
Fired whenever the mouse moves over the view.

Syntax

property OnMouseMove: TMouseMoveEvent;

Description

Fired whenever the mouse moves over the view. 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: show a tooltip with the current PDF coordinate, highlight the form field under the cursor, or display "hand" / "ibeam" cursors. 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.PdfViewOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  // show a tooltip with the current PDF coordinate, highlight the form field under the cursor, or display "hand" / "ibeam" cursors
  Caption := Format('OnMouseMove on page %d', [PdfView1.PageNumber]);
end;

See Also

OnClick, OnPageChange, OnMouseDown, PageNumber