RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IDesignerHook.GetRoot Method

Returns the current entity being edited by the form designer.

Pascal
function GetRoot: TComponent;
C++
__fastcall TComponent * GetRoot();

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

 

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