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
Disable typing in a combo box
Started by Chan, Sep 11 2006 05:14 PM
8 replies to this topic
#1
Posted 11 September 2006 - 05:14 PM
|
|
|
#2
Posted 12 September 2006 - 04:39 PM
Sounds like you just want the plain ol' ListBox. A ComboBox does have different DropDownStyles though, which you may want to look at.
#3
Posted 15 September 2006 - 10:17 AM
Just capture the keydown event and don't let them type. Very easy. ListBox doesn't look as good as a ComboBox.
#4
Guest_Jordan_*
Posted 21 September 2006 - 01:12 PM
Guest_Jordan_*
In your onKeyDown method use e.Handled = True
#5
Posted 21 September 2006 - 05:51 PM
How do I add that method? Do I just type in KeyDown()?
#6
Posted 26 September 2008 - 04:51 AM
does any one knows how to disable editing in a combo box?
#7
Posted 11 April 2009 - 05:08 AM
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
--------------------------------------------------------------------------
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
#9
Posted 14 June 2009 - 07:36 PM
But if you want the user to be able to either only select from list or Delete then Dropdownlist is no good


Sign In
Create Account


Back to top









