Sign in Join
FPDoc Onlineexperiment

TMouseEvent procedure type

In unit Controls

Specifies an event handler used to respond to mouse button events.

Declaration

pascal
TMouseEvent = procedure(Sender: TObject; Button: TMouseButton; 
 Shift: TShiftState; X: Integer; Y: Integer)
 of object

Arguments

Sender

TObject for the event notification.

Button

Mouse button for the event notification.

Shift

Modifier applied to the mouse button.

X

Horizontal position for the mouse cursor in the button event.

Y

Vertical position for the mouse cursor in the button event.

Description

TMouseEvent is an object procedure type which specifies an event handler for mouse button events.

TMouseEvent is the type used to implement the OnMouseDown and OnMouseUp event handlers in TControl. Applications must implement an object procedure using the signature for the event handler, and assign it to the property to respond to the event notification.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.