RAD Studio VCL Reference
TCustomActionMenuBar.SetParent Method

Sets the parent of the control.

procedure SetParent(AParent: TWinControl); override;
virtual __fastcall SetParent(TWinControl * AParent);

SetParent is the protected implementation of the Parent property. Override SetParent to execute additional code when the value of the Parent property changes. 

The AParent parameter specifies the new parent of the control. 

If the control already has a parent, SetParent removes the control from that parent's list of controls by calling the parent's RemoveControl method. If AParent is not nil (Delphi) or NULL (C++), SetParent calls its InsertControl method to add the control to its list of controls. 

The TControl destructor calls SetParent(nil (Delphi) or NULL (C++)) to remove the control from its parent's control list before destroying the component. 


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