ImageEn, unit ieview

TIEPointerEvent


Declaration

TIEPointerEvent = procedure(Sender: TObject; Event: TIEPointerEventType; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; Pressure: Integer) of object;


Description

Occurs when a pointer interacts with the control.

Note: Pointer support requires Delphi 10.3 Rio or newer


OnPointer vs OnPointerEx

TIEPointerEvent is a simplified version of TIEPointerExEvent
TIEPointerExEvent provides a lot more detail about the pointer via the Info property, including pen rotation and tilt data.


Demo

Demo  Demos\Other\PointerEvent\PointerEvent.dpr


Example

procedure TMainForm.ImageEnView1Pointer(Sender: TObject; Event: TIEPointerEventType; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; Pressure: Integer);
begin
  Caption := format( 'Pos: %d, %d - Pressure: %d', [ X, Y, Pressure ]);
end;


See Also

OnPointer
OnPointerEx
PointerDeviceCount
PenEffects