RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TThreadList.Duplicates Property

Indicates whether the thread list allows duplicate entries.

Pascal
property Duplicates: TDuplicates;
C++
__property TDuplicates Duplicates;

Set Duplicates to specify what should happen when an attempt is made to add a duplicate item to the list. The value of Duplicates should be one of the following.

Value 
Meaning 
dupIgnore  
Ignore attempts to add duplicate items to the list.  
dupError  
raise an EListError exception when an attempt is made to add duplicate items to the list.  
dupAccept  
Permit duplicate items in the list.  

Set Duplicates before adding any items to the list. Setting Duplicates to dupIgnore or dupError does nothing about duplicates that are already in the list.

Note: Setting duplicates to dupIgnore (the default) or dupError can be computationally expensive if the list has many items.
 

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