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 :)
 
Back
Top