0

Am looking for a way to search a listview for selected captain items and then for it to remove all the items that were found.

demo idea

to loop full list to find search string that can be changed via edit and then to delete all items that are the same as edit text

Edit text would be 'Simon1'

Items in list ListView would be like

Simon1 - deleted
Simon1 - deleted
Simon1 - deleted
Mark2 - undeleted
steven2 - undeleted
bob2 - undeleted

so on any one know how to do this?


thanks alot

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by pritaeas
1

It would be something like:

var
  li: TListItem;
begin
  li := ListView1.FindCaption(0, 'Simon', False, True, False);
  while li <> nil do begin
    li.Delete;
    li := ListView1.FindCaption(0, 'Simon', False, True, False);
  end;
end;

Edited by pritaeas: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.