Moin, zumindest was zum spielen kommt hier, sicherlich updatefähig.
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
Li : TListItem;
i : integer;
begin
Listview1.Clear ;
ListView1.OwnerData := false;
ListView1.Items.Count :=10;
ListView1.OwnerData:= false;
for i := 1 to 100 do
begin
Li := Listview1.Items.Add;
Li.Caption := inttostr(i)
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
Li : TListItem;
i : integer;
begin
Listview1.Clear ;
ListView1.OwnerData := True;
ListView1.Items.Count := 10000;
ListView1.OwnerData:= true; // switch to virtualmode;
for i := 1 to 100 do
begin
Li := Listview1.Items.Add;
Li.Caption := inttostr(i)
end;
end;
procedure TForm1.ListView1Data(Sender: TObject; Item: TListItem);
begin
if Item <> nil then Item.Caption := Item.Index.ToString();
end;
Grüße in die Runde