Classes.TComponent.ValidateInsert

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Classes.pas

	procedure ValidateInsert(AComponent: TComponent); dynamic;


Unit: Classes

Type: method

Visibility: protected

Member Of: TComponent

C++ Information

From Classes.hpp

	dynamic virtual void __fastcall ValidateInsert(Classes::TComponent * AComponent);


Unit: Classes

Type: method

Visibility: protected

Member Of: TComponent

Description

Provides the interface for a method that validates an child component before it is inserted.


ValidateInsert does nothing in TComponent. Descendant 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, descendant classes can override ValidateInsert to filter out those objects. To disallow an insertion, raise an exception in the derived method.

See Also

Personal tools
Translations
Newest Version