开发者

WinForms name chooser

开发者 https://www.devze.com 2022-12-26 06:58 出处:网络
I have a set of names (first, last, salutation) and need a control to allow users to select a single name using WinForms.A ComboBox works fine if the there are ~20 names, but not so well when the开发者

I have a set of names (first, last, salutation) and need a control to allow users to select a single name using WinForms. A ComboBox works fine if the there are ~20 names, but not so well when the开发者_如何学Pythonre are >100 names.

Can anyone recommend a name picker? Perhaps an address book control that I could customize? It's not too hard to write my own, but I have other wheels to invent.


I'm giving you an answer that seems more like a feature request... :-) It can be very easy to use if you implement a control which behaviour is similar to the auto-completion feature of Google: foreach char inserted by the user, a window appears with only the names that match with the string inserted.
I think that it isn't so hard to implement, but I'm sorry, I can't give you a recommendation, only an advice :-)


I agree with Maurizio. To add to his answer:

The most commonly used interface which does exactly this is in email clients, where they auto-complete names (and/or email addresses) as you type them. Thunderbird is a pretty good example. These usually either auto-complete if there is only one match, or show a drop-down list of possible autocompletions you can pick from. In addition, a button next to the field usually allows you to browse the address book as a list.

I'd also suggest filtering the autocompletions available in the most useful ways: e.g. As you type "wi", you could filter it down to names like "[WI]lson, John", "Amery, [WI]lliam", and "[I]ving, [W]alter", making it easy to find people by their initials as well as first and surnames.

0

精彩评论

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