954,164 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I need help with my combobox plsssss

Please faithfuls,
I ve been vein problems with the properties of the combo box.
wat i really want is disallow users to type into my combobox ( I want them to be limited to the items in the combo)
10qs.

Umarmai
Newbie Poster
4 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

set in the comboxbox properties the dropdownstyle to dropdownlist

GeekByChoiCe
Master Poster
721 posts since Jun 2009
Reputation Points: 208
Solved Threads: 168
 

In the Combobox keyPress event add this:

e.KeyChar = ChrW(0)
Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox4.KeyPress
        e.KeyChar = ChrW(0)
    End Sub


Regards.

raymyster
Light Poster
27 posts since Jan 2008
Reputation Points: -3
Solved Threads: 0
 

Very nice trick

samir_ibrahim
Junior Poster
155 posts since Sep 2008
Reputation Points: 69
Solved Threads: 19
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You