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.
VB Code:
  1. Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
  2. Handles ComboBox1.SelectedIndexChanged
  3.         With ComboBox1
  4.             If Not .SelectedItem Is Nothing Then
  5.                 .Text = "test"
  6.             End If
  7.         End With
  8.     End Sub
  9.  
  10.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
  11.         ComboBox1.Items.Add("blah")
  12.     End Sub
Any ideas?