Vb.net 2010 combobox not write

I would like when have a combobox, press a key for ex. "p" in the following example, and automatically combobox show the first item beginning with "p" (no problem). But also liked prevent user not write anything in the combobox.

France
Portugal
Usa
.....
rflorencioAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
set the DropDownStyle property to DropDownList
0
 
rflorencioAuthor Commented:
the main problem for me is prevent user to write in combobox,  changing property of combobox behavior is similar, or do I have to change other property.
0
 
Éric MoreauSenior .Net ConsultantCommented:
I do not understand. the DropDownList setting will not allow user to input into the combo box. It forces to pick one item.
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
rflorencioAuthor Commented:
we are talking about the same control right? combobox ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
yes.
0
 
ZhaolaiConnect With a Mentor Commented:
Set the combobox's AutoCompleteMode = Suggest, and AutoCompleteSource=ListItems, either at design time or in the code.
0
 
ZhaolaiCommented:
See the screen shot below:
Screenshot.PNG
0
 
ZhaolaiCommented:
Ah, if you do not want user to write in the combobox, @emoreau already answered your question. :=)
0
 
rflorencioAuthor Commented:
I still can write in the combobox which can be? I have a bindingsource to this control, it may be?
Img.jpg
Img2.jpg
0
 
Éric MoreauSenior .Net ConsultantCommented:
can you try to provide items?

how do you bind your combo because I see that your DataSource property is empty.

are you setting the DropDownStyle elsewhere in code?
0
 
rflorencioAuthor Commented:
I'm so sorry, the code actually had this property set to dropdown.
0
All Courses

From novice to tech pro — start learning today.