I don't want users typing into a combo box and I'd like it if they could only select from the list I apply. I'm not sure why you can't disable this feature properly but can someone tell me how its done?
thanks
Sounds like you just want the plain ol' ListBox. A ComboBox does have different DropDownStyles though, which you may want to look at.
Just capture the keydown event and don't let them type. Very easy. ListBox doesn't look as good as a ComboBox.
In your onKeyDown method use e.Handled = True
How do I add that method? Do I just type in KeyDown()?
does any one knows how to disable editing in a combo box?
this is what i use... very easy
--------------------------------------------------------------------------
Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
e.SuppressKeyPress = True
End Sub
--------------------------------------------------------------------------
vb 08
But if you want the user to be able to either only select from list or Delete then Dropdownlist is no good
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks