Hello,
My name is idi and today i ahve come to this side for first time. THis is really great!
I have a listview with playlist in the listview, true textbox i want to search in the listview. For example in the textbox i fill in the letter A and all title of songs beginning with letter A come to top of the listview, when i Fill in letters AB al songs beginning with AB are in top of the listview. I really don't now how to do tis. I have searched the net. The following i have tried. Please help me.
CODE
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
ListView1.Items.Clear()
ListView1.Sorting = SortOrder.Ascending
Dim teller As Integer
For ix As Integer = 0 To ListView1.Items.Count - 1
Dim ls As String = ListView1.Items(ix).Text
' If String.Compare(ls.Substring(0, TextBox2.Text.Length), TextBox2.Text, True) = 0 Then
' ListView1.Items(ix).Selected = True
' 'ListView1.Items(ix).EnsureVisible()
' Exit For
' End If
'Next ix
End Sub
With kind regards,
idi
This post has been edited by IDIS: 30 Apr, 2008 - 04:42 AM