[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#fcl)

# TComponent.InsertComponent

Insert the given component in the list of owned components.

## Declaration

`public procedure TComponent.InsertComponent(`
`AComponent: TComponent`
`);`

## Description

InsertComponent attempts to insert AComponent in the list with owned components. It first calls ValidateComponent to see whether the component can be inserted. It then checks whether there are no name conflicts by calling ValidateRename. If neither of these checks have raised an exception the component is inserted, and notified of the insert.

## See also

TComponent.RemoveComponent |  | Remove the given component from the list of owned components.
TComponent.Insert
TComponent.ValidateContainer |  | ??
TComponent.ValidateRename |  | Called when a name change must be validated
TComponent.Notification |  | Called by components that are freed and which received a FreeNotification.