Registriert seit: 28. Okt 2003
Ort: Bamberg
519 Beiträge
|
Re: Listview OwnerData
17. Nov 2005, 14: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;
|
|
Zitat
|