FMX.Forms.TCommonCustomForm.FindTarget
Delphi
function FindTarget(P: TPointF; const Data: TDragObject): IControl; virtual;
C++
virtual Fmx::Types::_di_IControl __fastcall FindTarget(const System::Types::TPointF &P, const Fmx::Types::TDragObject &Data);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | FMX.Forms.pas FMX.Forms.hpp |
FMX.Forms | TCommonCustomForm |
Description
Returns the specified control located at the given coordinates.
FindTarget iterates through all the children of this form and searches for the control given through the Data
parameter at the coordinates specified by P
. If the given control was not found, FindTarget returns nil, otherwise it returns the object.
FindTarget is used internally in drag-and-drop operations.
Tip: The control searched for must be an IControl, must be Visible, and HitTest must be set to True.