Delphi TStringList not allowing duplicatesPosted by BeckyR:
How do I use the duplicates property to raise an exception when a duplicate string is
added to a Delphi stringlist? for iTemp := 0 to frmData.sgClasses.Rowcount - 1 do begin try slGeneratedTemp.Add(frmData.sgClasses.Cells[11,iTemp]); except on EStringListError do showmessage('duplicate scan codes'); end; end;
|