Hi,
I hope this sample can help:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| procedure TForm1.Button1Click(Sender: TObject); Var i : Integer; ListItem: TListItem; begin for i:=0 to ListView2.Items.Count -1 do begin if (ListView2.Items.Item[i].SubItems.IndexOf(Edit1.Text) > -1) then ListView1.Items.AddItem(ListView2.Items.Item[i], -1); end; end; |
The string edit1.text will be searched in Listview2 in all SubItems. When it was found, it will be added to Listview1.
I have not tested it... So I hope it will work
