PDFium Delphi Component Docs

събитие OnMouseDown

Компонент: TPdfView  ·  Модул: PDFium
Задейства се, когато потребителят натисне бутон на мишката върху изгледа

Синтаксис

property OnMouseDown: TMouseEvent;

Описание

Fired when the user presses a mouse button 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: begin a custom selection box, start panning, or capture coordinates for a "go to this annotation" feature. 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.

Забележки

Пример

procedure TForm1.PdfViewOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  // begin a custom selection box, start panning, or capture coordinates for a "go to this annotation" feature
  Caption := Format('OnMouseDown on page %d', [PdfView1.PageNumber]);
end;

Виж също

OnClick, OnPageChange, PageNumber