【问题标题】:TypeAhead Feature TextBox Control Windows C#TypeAhead 功能 TextBox 控件 Windows C#
【发布时间】:2010-08-19 12:27:43
【问题描述】:

我正在使用 TextBox 的 typeahead 功能.. 我想要的只是 Typeahead 应该显示 AutoCompleteStringCollection 中可用的所有项目。

目前它建议我那些以我输入的字符开头的字符串。 我需要的是我输入的字符可以存在于字符串中的任何位置,而不仅仅是开头。

在 TextChange 事件上 我正在做的是制作一个临时 AutoCompleteStringCollection 并将其与文本框相关联。

现在我需要做的就是每次都显示它。 有什么想法吗?

【问题讨论】:

  • 嗯,请提供更多信息?你试过什么?你到底想让它做什么?它现在在做什么?

标签: c# autocomplete


【解决方案1】:

支持 AutoComplete 的 Winform 控件使用的是 IE 的 AutoComplete API,它在 Windows Vista 之前不支持 ACO_NOPREFIXFILTERING。由于 WinForm 需要支持早期的系统,所以 .Net 中不支持 ACO_NOPREFIXFILTERING。

如果你想在该功能可用时使用它,你可以skip Windows Form's AutoComplete support and call the API directly

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多