我正在使用 TextBoxes 的 AutoComplete Suggest 模式属性使其自动完成,我想用它实现的是用户可以键入任何可以作为整个字符串的一部分的单词,并基于此它应该向我显示查找.
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.
将 TextBox AutoSuggest Source 设置为 Custom Source 并将 AutoSuggest 模式设置为 Suggest Mode 我只能获取那些以用户键入的单词开头的字符串的循环.
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.
我正在使用 C# - WinForms
I am using C# - WinForms
我认为最好的选择是创建自己的 IAutoComplete 实现.这是有关它的信息:http://msdn.microsoft.com/en-us/library/bb776292(VS.85).aspx
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
如果您在 .net 反汇编程序中查看 System.Windows.Forms.dll,您会发现它在幕后使用 SHAutoComplete,该链接中也提到了它.
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.
您还可以搜索一些创建自己的 IAutoComplete 实现的人的代码示例.
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.
这篇关于具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!