From RAD Studio API Documentation
Jump to: navigation, search


function FindDragTarget(const Pos: TPoint; AllowDisabled: Boolean): TControl;


extern DELPHI_PACKAGE TControl* __fastcall FindDragTarget(const System::Types::TPoint &Pos, bool AllowDisabled);


Type Visibility Source Unit Parent
function public
Vcl.Controls Vcl.Controls


Returns the control at a specified screen coordinate.

Call FindDragTarget to determine the potential drag-and-drop or drag-and-dock target currently under the mouse. FindDragTarget returns the control at the position specified by the Pos parameter. If there is not control at the specified position, FindDragTarget returns nil (Delphi) or NULL (C++). The AllowDisabled parameter determines whether the search includes disabled controls.

If FindDragTarget returns a control, this does not mean that the control will necessarily accept the dragged object. The control will only accept the dragged object if it has an OnDragOver or OnDockOver event handler that accepts the object or if its DockSite property is true.

See Also