RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponent.ValidateContainer Method

Determines whether an object can be inserted into a container.

Pascal
procedure ValidateContainer(AComponent: TComponent); dynamic;
C++
__fastcall ValidateContainer(TComponent * AComponent);

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.  

Descendant 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. 

 

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