Vcl.Controls.TWinControl.InsertControl
Delphi
procedure InsertControl(AControl: TControl);
C++
void __fastcall InsertControl(TControl* AControl);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TWinControl |
Description
Inserts a control into the Controls array property.
Applications should not need to call InsertControl directly. Child controls are automatically inserted and removed when added or deleted at design time. At run time, use the Parent property of the child control to insert it in the Controls array. If the child control is already the child of another control, setting the Parent property ensures that the child is removed from the Controls of the original parent.
InsertControl makes the inserted control a child, and the containing control the parent. The AControl
parameter is the child control that is inserted into the Controls array.
See Also
Code Examples