[RESOLVED] ComboBox Behaviour
I have a comboBox with items that are added or deleted at runtime.
Sometimes I need the combobox to display "Varies" where no specific selection applies.
A normal comboBox highlights the text once you click it but you can then highlight portions or set the cursor at a specific position in the text.
I currently add a Click event to remove "Varies".
HTML Code:
Private Sub ComboBox1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ComboBox1.Click
If ComboBox1.Items.Contains("Varies") Then ComboBox1.Items.Remove("Varies")
End Sub
But
1: This disables this normal functionality. Everytime I click it highlights the full text.
2: If I press escape without selecting another item it returns the combobox.text as "" which I really need to go as unhandled and revert to "Varies"
Hope someone can help.