问题描述
我正在使用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)