I want to change the text of a combo box when a list item in it is clicked -- I have an array of strings that I want it to display instead of the actual list items. For example, one of the list items is "Text Files (*.txt)" -- when that is clicked, I want the combo box to display "*.txt". However, I haven't been able to achieve this. The following code apparently doesn't change the combo's text when the item is clicked. To see this, create a new windows form and drop a combo box on it.Any ideas?VB Code:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles ComboBox1.SelectedIndexChanged With ComboBox1 If Not .SelectedItem Is Nothing Then .Text = "test" End If End With End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("blah") End Sub
