具有“喜欢"子句的功能的自动完成文本框示例%hello%C#Windows [英] AutoComplete TextBox with Features of Like Clause example %hello% C# Windows

查看:33
本文介绍了具有“喜欢"子句的功能的自动完成文本框示例%hello%C#Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用TextBoxes的AutoComplete建议模式属性使其具有AutoComplete功能,我想要实现的是用户可以键入可以覆盖整个字符串一部分的任何单词,并以此为基础向您显示查找内容./p>

将TextBox的AutoSuggest源设置为自定义源",并将AutoSuggest模式设置为建议模式",我只能获得那些以用户键入的单词开头的字符串的循环.

有没有一种方法可以调整/覆盖这些属性的功能,或者是否有其他可用的选项.

我正在使用C#-WinForms

解决方案

我看到的最好的选择是创建自己的IAutoComplete实现.这是有关的信息: http://msdn.microsoft.com/en-us/library/bb776292(VS.85).aspx

如果您要在.net反汇编程序中查看System.Windows.Forms.dll,您会发现它的底层使用的是SHAutoComplete,该链接中也提到了该功能.

您还可以搜索创建自己的IAutoComplete实现的人员的一些代码示例.

让我知道您是否还有其他建议.

I am using TextBoxes's AutoComplete Suggest mode property to make it AutoComplete, What I want to achieve with it is a user can type any word which can pe part of the whole string and based on that It should show me the lookup.

With TextBox AutoSuggest Source set to Custom Source and AutoSuggest mode set to Suggest Mode I can only get loopups for those string which starts with the word that user types.

Is there a way using which I can just tweak/override the functionality of these properties or is there any other option available.

I am using C# - WinForms

解决方案

The best option I see would be to create your own implementation of IAutoComplete. Here is info on it: http://msdn.microsoft.com/en-us/library/bb776292(VS.85).aspx

If you were to look at System.Windows.Forms.dll in a .net disassembler you will see that under the covers it is using SHAutoComplete, which is also mentioned in that link.

Also you can do some searches for some code samples of people creating their own IAutoComplete implementations.

Let me know if you come up with anything else.

这篇关于具有“喜欢"子句的功能的自动完成文本框示例%hello%C#Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆