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

# TControl.DoEndDrag

Signals the OnEndDrag event handler.

## Declaration

Source position: controls.pp line 1470

`protected procedure TControl.DoEndDrag(`
`Target: TObject;`
`X: Integer;`
`Y: Integer`
`); virtual;`

## Arguments

`Target` |  | Object instance with the target control or dock site.
`X` |  | Horizontal mouse coordinate where the mouse button was released.
`Y` |  | Vertical mouse coordinate where the mouse button was released.

## Description

DoEndDrag occurs when a drag operation for the control has been completed. In TControl, it signals the OnEndDrag event handler (when assigned). Arguments to the handler include the target control (or dock site) and the mouse coordinates when the drag operation was completed.

No actions are perform in the method if a handler routine has not been assigned to OnEndDrag.

Descendent classes may override the method to perform additional actions needed in their implementation.

DoEndDrag is called from the EndDrag method in TDragObject.

## See also

TControl.OnEndDrag |  | Event handler signalled for the end of a drag-drop operation.
TDragObject.EndDrag |  | Called when a dragging operation ends.