[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ExtCtrls' (#lcl)

# TCustomTrayIcon.OnMouseDown

Event handler signalled when a mouse button down event is detected for the tray icon.

## Declaration

Source position: extctrls.pp line 1472

`public property TCustomTrayIcon.OnMouseDown : TMouseEvent read FOnMouseDown write FOnMouseDown;`

## Description

OnMouseDown is a TMouseEvent property with the event handler signalled when a mouse button down event is detected for the tray icon. Arguments passed to the event handler identify:

Sender
  The object for the event notification.
Button
  The mouse button for the event.
Shift
  The state for the Shift / Ctrl / Alt keys.
X and Y
  The current coordinates for the mouse pointer.

An application must implement and assign an object procedure using the signature for the event handler to respond to the notification.

Use OnMouseUp to respond to the mouse up event for a mouse button.

## See also

TCustomTrayIcon.OnMouseUp |  | Event handler signalled when a mouse button up event is detected for the tray icon.
TMouseEvent |  | Specifies an event handler used to respond to mouse button events.
TMouseButton |  | Enumeration with values for logical mouse buttons.
TShiftState