PDFium Delphi Component Docs

OnFormCursor event

Component: TPdf  ·  Unit: PDFium
Fires when the form layer requests a cursor shape for the field under the pointer

Syntax

property OnFormCursor: TPdfFormCursorEvent read FOnFormCursor write FOnFormCursor;

Description

OnFormCursor fires when the interactive form layer asks which cursor to show. The handler receives the decoded Cursor of type TPdfFormCursor (pfcUnknown, pfcArrow, pfcSizeNESW, pfcSizeNWSE, pfcVerticalBeam, pfcHorizontalBeam, pfcHand), the raw NativeCursorType code, and a var Handled flag

Set Handled = True to apply a host-specific cursor; when no handler is assigned or Handled stays False, the component maps the decoded value onto the matching VCL cursor

Remarks

Example

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;

See Also

FormHostCallbacksComplete, FormHostCallbacks, TPdfView.DragCursor