Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box with out bein able to type in it

Status
Not open for further replies.

jl280328

Programmer
Jun 15, 2006
97
0
0
US
I know this question is elementary but, how do i make it so a user can only select an item from the list in a combo box and not be able to type any values into the box itself. I saw some things about a drop down list but could not find that control.
 
nevermind I finally found the dropdownstyle option on the properties I'm an idiot!
 
There is a property for the combobox called DropDownStyle. There are three options for it:

(From Help Files)
DropDown - The text portion is editable. The user must click the arrow button to display the list portion. This is the default style.
DropDownList - The user cannot directly edit the text portion. The user must click the arrow button to display the list portion. The list displays only if AutoCompleteMode is Suggest or SuggestAppend.
Simple - The text portion is editable. The list portion is always visible.

Set the DropDownStyle for the combo box to DropDownList. And Make sure you have the AutoCompleteMode set as mentioned above.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
I know it's a bit late, but to jl280328
thanks for posting your answer

>nevermind I finally found the dropdownstyle option on the properties I'm an idiot!

because I guess I'm an idiot too (YOUR ANSWER ENDED MY LONG AN PAINFUL SEARCH for the answer) I've been trying to handle it using handlers that handled keydown presses etc..
What a pain!

THIS, is why it's cool to post solutions like you did.
Kudos

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top