System.Classes.TComponent.InsertComponent
Delphi
procedure InsertComponent(const AComponent: TComponent);
C++
void __fastcall InsertComponent(TComponent* const AComponent);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TComponent |
Description
Establishes the component as the owner of a specified component.
InsertComponent adds the component passed in the AComponent
parameter to the end of the Components array property. The inserted component must have no name (no specified Name property value), or the name must be unique among all others in the Components list.
When the owning component is destroyed, AComponent
is also destroyed.
Components are automatically inserted and removed when visually manipulating them in the form designer. Use InsertComponent when manually adding components to another Owner component's Components list.
See Also
Code Examples