hallo,
ich glaube das hilft dir weiter.
Delphi-Quellcode:
...
uses
VirtualListData;
...
private
VirtualData: TVirtualData;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
VirtualData := TVirtualData.Create(ListView1);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
VirtualData.Free;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Item: TVirtualItem;
i: Integer;
begin
VirtualData.BeginUpdate;
try
for i := 0 to 200000 - 1 do
begin
Item := FVirtualData.Add;
Item.Caption := 'irgendwas ' + IntToStr(i);
Item.SubItems.Add(IntToStr(i));
Item.SubItems.Add(IntToStr(i));
Item.SubItems.Add(IntToStr(i));
end;
finally
FVirtualData.EndUpdate;
end;
end;
gruß,
cookie