RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCollection.SetItemName Method

Initializes the name of a newly inserted collection item.

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

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) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!