RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponent.ValidateRename Method

Ensures that renaming an owned component does not create name conflict.

Pascal
procedure ValidateRename(AComponent: TComponent; const CurName: string; const NewName: string); virtual;
C++
virtual __fastcall ValidateRename(TComponent * AComponent, const AnsiString CurName, const AnsiString NewName);

ValidateRename checks to see if a component can rename one of its owned components, passed in AComponent, from its current name (CurName) to the string passed in NewName. If AComponent is nil (Delphi) or NULL (C++) or NewName is already the name of a component in the Components list, ValidateRename raises an EComponentError exception. 

ValidateRename is used internally when the Name property is modified. It is not necessary to call it directly. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!