System.Classes.TComponent.ValidateInsert
Delphi
procedure ValidateInsert(AComponent: TComponent); dynamic;
C++
DYNAMIC void __fastcall ValidateInsert(TComponent* AComponent);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.Classes.pas System.Classes.hpp |
System.Classes | TComponent |
Description
Provides the interface for a method that validates a child component before it is inserted.
ValidateInsert does nothing in TComponent. Descendent classes can override it to disallow a component from accepting an object as a child. By default, ValidateInsert allows any object to be inserted into the component.
If a component needs to validate only certain objects, descendent classes can override ValidateInsert to filter out those objects. To disallow an insertion, raise an exception in the derived method.