Author: William Gerbert Avoid duplicate items in string lists Answer: 1 var 2 sl: TStringList; 3 begin 4 sl := TStringList.Create; 5 with sl do 6 begin 7 Sorted := True; 8 Duplicates := dupIgnore; 9 10 // 11 // add your items here 12 // all the duplicate items 13 // will be ignored 14 // 15 Add(Input1.text); 16 end; 17 18 // 19 // now you can assign the 20 // string list with unique 21 // items to listbox1 (example) 22 // 23 ListBox1.Items.Assign(sl); 24 sl.Free; 25 end;