Thema: Delphi Listview OwnerData

Einzelnen Beitrag anzeigen

mumu

Registriert seit: 28. Okt 2003
Ort: Bamberg
519 Beiträge
 
#2

Re: Listview OwnerData

  Alt 17. Nov 2005, 13:42
folgendes sollte helfen
Delphi-Quellcode:
procedure THaupt.Button1Click(Sender: TObject);
Var
i: Integer;
listitem : TListItem;
z: TStrings;
begin
if FileExists(label17.caption + 'rss.xml') then
Begin
Listview.Clear;
Listbox1.Clear;
Listbox2.Clear;
SimpleRSS.LoadFromFile(label17.caption + 'rss.xml');
 
[color=#ff0000]ListView.BeginUpdate;[/color]

   For i := 0 to SimpleRSS.Items.Count - 1 do
   Begin
      z := CreateStrings(SimpleRSS.Items.Items[i].Description);
      Listbox1.Items.Add(SimpleRSS.Items.Items[i].Link);
      listitem := listview.Items.add;
      listitem.Caption := IntToStr(Succ(i));
      z.Values['Added'] := Parse(' ', z.Values['Added'], 1);
      listitem.SubItems.add(z.Values['Added']);
      listitem.SubItems.add(z.Values['Category']);
      listitem.SubItems.add(SimpleRSS.Items.Items[i].Title);
      listitem.SubItems.add(z.Values['Size']);
      listitem.SubItems.add(z.Values['Status']);
      listitem.SubItems.add(z.Values['Speed']);
      Listbox2.Items.add(z.Values['Download']);
      Groupbox2.Caption := 'Aantal torrents: ' + IntTostr(SimpleRSS.Items.Count);
      z.Free;
      Listview.Invalidate;
   end;

[color=#ff0000]ListView.EndUpdate;[/color]
 
end;
end;
  Mit Zitat antworten Zitat