FMX.Forms.TScreen.GetObjectByTarget
Delphi
function GetObjectByTarget(const Target: TObject): TFmxObject;
C++
Fmx::Types::TFmxObject* __fastcall GetObjectByTarget(System::TObject* const Target);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Forms.pas FMX.Forms.hpp |
FMX.Forms | TScreen |
Description
Returns an object based on a target object.
GetObjectByTarget returns:
- The focused control if the TScreen object is not assigned.
- The
Target
control either as TControl or as TCommonCustomForm, depending on the type of theTarget
parameter (either a TControl or a TCommonCustomForm). - The active form, if none of the above applies.
- The main form of the application, if none of the above applies and the Application object is assigned.