Do a free text search in a combobox

Poxtro

New member
Joined
Jan 11, 2009
Messages
3
Programming Experience
1-3
Hi. I'd Like to know how to make a free text search function, If you don't Know what i mean by "Free Text Search" then here is an example:

Lets say i want to search for the string "ong" in a Combobox(In the list ofc)
And we have the following Listitems:
Tim Carlson
Bob Hanks
Julie Wong
Jennifer Sanfre
Jimmy Wong
<<

then Both Julie and Jimmy Should apper in the combobox list.


well i know i'm not good at explaining things but anyway Help me out k ?

just post responses to this if you want to have it better explained(I will atleast try to)
 
VB.NET:
For Each item As Object In Me.ComboToSearch.Items
    Dim itemtext As String = Me.ComboToSearch.GetItemText(item)
    If itemtext.Contains("search string") Then
        Me.ComboResults.Items.Add(itemtext)
    End If
Next
 
What do you mean?
 
Back
Top