Read-only ComboBox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I prevent the user from typing text in a ComboBox's TextField other than the defined items names in that ComboBox?
 
* "=?Utf-8?B?QW1qYWQ=?= said:
How can I prevent the user from typing text in a ComboBox's TextField other than the defined items names in that ComboBox?

Why not set its 'DropDownStyle' property to 'DropDownList'?
 
How can I prevent the user from typing text in a ComboBox's TextField other than the defined items names in that ComboBox?

You can use the combobox's FindString method in the KeyDown event to
implement an autosearch. In the process, if no match is found, you
could raise an error or revert it back to the previous entry...

Just an idea off the top :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top