RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.GetChildren Method

Returns the "child" components of the form; that is, those components that return the form from their GetParentComponent method.

Pascal
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
C++
virtual __fastcall GetChildren(TGetChildProc Proc, TComponent * Root);

The component streaming system calls GetChildren to request that the form execute a callback for every child component in the form. The callback must execute in creation order (the order the child components appear in the form file). A child component is defined as any component that returns this form from its GetParentComponent method. 

Proc is the callback to execute for every child component. 

Root specifies the top-level component (such as a form or data module) that is currently being loaded or saved.  

In TCustomForm, GetChildren first calls the inherited method, which executes Proc for every control that lists the form as its Parent. Then, if the Root parameter identifies this form, GetChildren executes Proc for every child component that does not have a Parent. 

 

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