Listview

Leeus

Regular
Joined
Dec 23, 2002
Messages
50
Hi all, I have a listview which items can be added using a textbox. This bit is working a dream, ideally what I want is for each of the items in the listview somwthing to be done with it. i.e. I have a list of e-mail addresses in there, I want to check if any of these are in my current string.

I suppose I just need the code to iterate through the listview and I should be OK!
 
Right so.

Visual Basic:
'PSEUDOCODE (NOT SURE ABOUT THE TYPES AND METHODS)
Dim anItem as ListViewItem
Dim aSubItem as ListViewSubItem

For each anItem in myListView.Items
   If anItem.Text = "interesting" then 
     DoSomething
   else
     For each aSubItem in anItem.SubItems
        If aSubItem.Text = "interesting" then 
           DoSomething
        end if
     next
  end if
next
 
Back
Top