System.Classes.TComponent.ValidateContainer
API:System.Classes.TComponent.ValidateContainer
Description
Determines whether an object can be inserted into a container.
ValidateContainer is called by a component when it is about to be inserted into a container object. By default, ValidateContainer calls the ValidateInsert method of the component specified by the AComponent parameter.
Descendent components can override ValidateContainer to disallow a component from being inserted into specific containers. To disallow an insertion, raise an exception in the derived method.