Vcl.Forms.IDesignerHook.GetRoot
Delphi
function GetRoot: TComponent;
C++
virtual System::Classes::TComponent* __fastcall GetRoot(void) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | IDesignerHook |
Description
Returns the current entity being edited by the form designer.
Call GetRoot to obtain the object the form designer is working on. If this object is a descendant of TCustomForm, GetRoot returns the value of the Form property.
Use GetRoot rather than the Form property, to ensure that code works even when editing a data module, remote data module, active form, or other entity that is not a descendant of TCustomForm.