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

# TControl.OnDragOver

Event handler signalled when a control is dragged over the control instance.

## Declaration

Source position: controls.pp line 1586

`protected property TControl.OnDragOver : TDragOverEvent read FOnDragOver write FOnDragOver;`

## Description

OnDragOver is a TDragOverEvent property with the event handler signalled when another control is dragged over the current control. It is signalled from the DragOver method, and occurs when drag messages are handled for the control.

The Sender argument is the current TControl instance.

The Source argument contains the control instance which is being dragged over the control.

The X and Y arguments contain the control-relative coordinates for the mouse pointer when the event was triggered.

State indicates whether the event has occurred when the mouse pointer entered the control, was repositioned, or exited the control.

The Accept argument indicates whether the drag operation is handled in the routine or rejected. Set Accept to False to reject a drop on the control.

## See also

TControl.DragOver |  | Called when an object is dragged over this control; Determines whether a drop is acceptable, using the OnDragOver handler.
TDragOverEvent |  | The type of an OnDragOver handler.