开发者

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

Enable full find-as-you-type combo box in WinForms?

  • http://www.codeproject.com/Articles/3958/A-C-auto-complete-combo-box
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜