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

# TControl.OnMouseEnter

Event handler signalled when the mouse pointer has entered the control.

## Declaration

Source position: controls.pp line 1592

`protected property TControl.OnMouseEnter : TNotifyEvent read FOnMouseEnter write FOnMouseEnter;`

## Description

OnMouseEnter is a TNotifyEvent property with the event handler signalled when the mouse pointer has entered the bounds for the control. OnMouseEnter is signalled from the MouseEnter method (when assigned), and occurs after the Parent control has been notified of the event. The Sender argument contains the control for the notification, and must be cast to a TControl type to access the properties or values specific to the class type.

Use OnMouseLeave to perform actions needed when the mouse pointer has left the bounds for the control.

## See also

TControl.MouseEnter |  | Signals the OnMouseEnter event handler (when assigned).
TControl.CMMouseEnter |  | Handles a CM_MOUSEENTER message for the control.
TControl.OnMouseLeave |  | Event handler signalled when the mouse pointer has left the control.
TNotifyEvent