I assume that you want the user to be able to type a value into the combobox
at runtime, instead of merely picking an item from the list. To do this, set
the combobox's DropDownStyle to DropDown instead of DropDownList.
Third solution. If you want to enter a non existant value in a combobox, and have it added to the list.
Capture the KeyPress event and test for (char)13, which is the enter key, and the Leave event in case you TAB out of the control. Browse through the item list to see if the item already exists, and if not, add it.
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.