Hi
How do I cycle through the items in a ListView1?
I load them with key and value with ADD. And what I want to do is loop through the values of all the rows to change the color as the user types text that is equal to the value.
How do I cycle through the items in a ListView1?
- gambafeliz
- Posts: 141
- Joined: Friday 2nd September 2022 7:50pm
- Location: I live in the same city as Picasso
How do I cycle through the items in a ListView1?
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
- gambafeliz
- Posts: 141
- Joined: Friday 2nd September 2022 7:50pm
- Location: I live in the same city as Picasso
Re: How do I cycle through the items in a ListView1?
My solution:
Public Sub txtFind_KeyRelease()
For Each key As Integer In ListView1.Keys
If String.InStr(UCase(ListView1[key].Text), UCase(txtFind.Text)) <> 0 Then
ListView1[key].Foreground = Color.Blue
Else
ListView1[key].Foreground = Color.Default
Endif
Next
ListView1.Refresh
End
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.