自动完成电子邮件地址和/或C#的名字 [英] Autocomplete email address and/or names in C#
问题描述
我在寻找像这里所讨论的一个解决方案,但对于C#的WinForms。
<一href=\"http://stackoverflow.com/questions/1300091/need-gmail-like-functionailty-jquery-autocomplete-to-include-names-and-email-ad\">Link这里
I'm looking for a solution like the one discussed here, but for C# WinForms. Link here
要改一下,是否有可能使用具有多行的单一数据源做文本框自动完成在C#中?结果应该是像Gmail的TO:字段创建电子邮件,或类似的MS Outlook的TO:字段
To rephrase, is it possible to do textbox autocompletes in C# using a single data source with multiple lines? Result should be like Gmail's TO: field in creating emails, or similarly MS Outlook's TO: field.
例如,数据集可以是:
约翰·威廉姆斯(john.williams@gmail.com)
鲍勃·约翰逊(john.jacobs@gmail.com)
威利·约翰斯顿(willy.williams@gmail.com)
威利·威廉斯(johnjohn@gmail.com)
For example, the data set might be:
"John Williams" (john.williams@gmail.com)
"Bob Johnson" (john.jacobs@gmail.com)
"Willy Johnston" (willy.williams@gmail.com)
"Willy Williams" (johnjohn@gmail.com)
...我应该能够输入约翰和所有四个将被建议。如果我输入约翰,那么第二和第三项将被建议。
... and I should be able to type "john" and all four would be suggested. If I typed "johns" then the second and third entries would be suggested.
这是比自动完成由.NET默认提供的。
This is more advanced than the auto-complete provided by .NET by default.
谢谢,
-Greg
Thanks, -Greg
推荐答案
我结束了写我自己的用户控件自定义类来照顾这。它没有出现在那里是什么,在那里,遇到了我的需求。
I ended up writing my own UserControl custom class to take care of this. It didn't appear there was anything out there that met my needs.
我提供基于BSD源和这里DLL:
的http://$c$c.google.com/p/email-autocomplete 一>
I've provided the source and DLL here under BSD: http://code.google.com/p/email-autocomplete
基本上,它模拟到的功能框Gmail,但当然在.NET中的。
Basically, it emulates the functionality of the "To:" box on Gmail but of course in .NET.
这篇关于自动完成电子邮件地址和/或C#的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!