stringlistcontainer Duplicates property
Return to Introduction  Previous page  Next page
Applies to
acStringListContainer component.  

  TDuplicates = (dupIgnore, dupAccept, dupError);  
property Duplicates: TDuplicates;  

The Duplicates property determines whether duplicate strings are allowed in the list of strings.  
iiwarning Unlike of the usual TStringList, where the Duplicates property only takes the effect in sorted lists only, here the Duplicates works independently, whether the list is sorted or not. It works always and don't let to add the same string if Duplicates = dupIgnore.  
These are the possible values for Duplicates property:  
Value   Meaning  
dupIgnore   Attempts to add a duplicate string to a list are ignored  
dupAccept   Duplicate strings CAN be added to a string list  
dupError   Adding a duplicate string results in an EListError exception  

See also
Sorted property.