FMX.Controls.TControl.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.Controls.pas FMX.Controls.hpp |
FMX.Controls | TControl |
Description
Returns the target control.
P
is the current position of the dragged object.
Data
is the dragged object.
FindTarget checks whether P
belongs to the current control or any of its children (using a recursive method) and, if so, returns the control that contains P
.
If the target control or any of its children is in designing mode or is not visible, FindTarget returns nil.