PDFium Delphi Component Docs

OnFormCursor 事件

元件: TPdf  ·  單元: PDFium
當表單層為指標下的欄位要求游標形狀時引發

語法

property OnFormCursor: TPdfFormCursorEvent read FOnFormCursor write FOnFormCursor;

說明

OnFormCursor 在互動式表單層詢問應顯示哪個游標時引發。處理常式會收到型別為 TPdfFormCursor 的已解碼 Cursor(pfcUnknown、pfcArrow、pfcSizeNESW、pfcSizeNWSE、pfcVerticalBeam、pfcHorizontalBeam、pfcHand)、原始的 NativeCursorType 代碼,以及 var Handled 旗標

設定 Handled = True 可套用主機專屬的游標;未指定處理常式或 Handled 保持 False 時,元件會把解碼後的值映射到對應的 VCL 游標

備註

範例

procedure TMain.Pdf1FormCursor(Sender: TObject; Cursor: TPdfFormCursor; NativeCursorType: Integer; var Handled: Boolean);
begin
  if Cursor= pfcVerticalBeam then begin
    Screen.Cursor := crIBeam;
    Handled := True;
  end;
end;

另請參閱

FormHostCallbacksComplete, FormHostCallbacks, TPdfView.DragCursor