Enable full find-as-you-type combo box in WinForms?
The Windows Forms ComboBox control only offers partial find-as-you-type functionality - it only searches for the first letter. For example if you type "c" and "a", don't expect "California" to become selected - instead you'll land on a state starting with "a".
Somehow, perhaps through Firefox, I got used to being able to find items by typing out the first several letters of the item. This is particularly helpful if the items are not sorted in alphabetical order for one reason or another.
Is there a wa开发者_如何学JAVAy to enable find-as-you-type for WinForms combo boxes that ideally doesn't involve a whole lot of coding or paying for third-party components?
The feature you are looking for is Autocomplete in ComboBox. Default behavior will not allow, what you want to do. I doubt you have to roll your own logic or inherit some one's work.
You can check following articles on CodeProject for the same.
- http://www.codeproject.com/Articles/16285/Auto-Complete-ComboBox
- http://www.codeproject.com/Articles/3958/A-C-auto-complete-combo-box
精彩评论