AutoComplete TextBox with Features of Like Clause example %hello% C# Windows(具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows)
问题描述
我正在使用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows


基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01