Usage (add non-existing items from ListBox2 to ListBox1) :
MergeStrings(ListBox1.Items, ListBox2.Items) ;
~~~~~~~~~~~~~~~~~~~~~~~~~
procedure MergeStrings(Dest, Source: TStrings) ;
var j : integer;
begin
for j := 0 to -1 + Source.Count do
if Dest.IndexOf(Source[j]) = -1 then
Dest.Add(Source[j]) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» Hide caret (text cursor) "inside" TMemo component
« Hiding the cursor from the screen

