I've a combobox to display names:
When user digit on the combobox I would to filter and show only the names that contains the string entered.Code:Dim names As New List(Of String) Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load names.Add("John") names.Add("Paul") names.Add("Lea") names.Add("Jen") names.Add("Joan") names.Add("Alex") names.Add("Jonny") names.Add("Alexis") names.Add("Francis") cmbNames.DataSource = names End Sub
So in textchange event I tryed to use .Contains and .findString, but I not get the behavour expected:
if "is" digit, I would have Alexis and Francis as result, if "Jo" is entered it would get John, Jonny and Joan. Instead I still get only the result that start with the string searched.
Any advice?




Reply With Quote
