RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDefCollection.SetItemName Method

Initializes the name of a newly inserted collection item.

Pascal
procedure SetItemName(AItem: TCollectionItem); override;
C++
virtual __fastcall SetItemName(TCollectionItem AItem);

The Insert method calls SetItemName to initialize the Name property of items when it inserts them into the collection. 

As implemented in TCollection, SetItemName does nothing. Some TCollection descendants override this method to provide collection items with default names. 

 

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