RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Controls.FindDragTarget Function

Returns the control at a specified screen coordinate.

Pascal
function FindDragTarget(const Pos: TPoint; AllowDisabled: Boolean): TControl;
C++
TControl * FindDragTarget(const TPoint Pos, Boolean AllowDisabled);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!