Hi marabu ja ich verwende Items.BeginUpdate und Items.EndUpdate, die Liste wird auch vorher geleert.
Delphi-Quellcode:
var
FieldList: TStringList;
begin
Listview.Items.BeginUpdate; <------------
Listview.Clear; <------------
FieldList := TStringList.Create;
// ...
try
sl.LoadFromFile(label2.caption + '\torrents.db');
KillDuplicatesEx(sl, 2);
for i := 0 to Pred(sl.Count) do
begin
FieldList.CommaText := sl[i];
with ListView.Items.Add do
begin
Caption := FieldList[0];
FieldList.Delete(0);
SubItems.Assign(FieldList);
end;
end;
finally
Listview.Items.EndUpdate; <--------------
FieldList.Free;
// ...
end;
// ...
end;