如何使一个文本框显示自动完成建议空当 [英] How to make autocomplete on a TextBox show suggestions when empty
问题描述
我使用一个文本框(实际上是一个ToolStripTextBox)自动完成的属性。除了它这是工作的罚款不显示,直到我在租赁一个字符类型。我该如何使它所以建议显示,即使文本框为空?
I am using the AutoComplete properties on a textbox (actually a ToolStripTextBox). This is working fine except it doesn't show until I type at lease one character. How do I make it so the suggestions are shown even if the textbox is empty?
Mode = Suggest
Source = CustomSource
来源progamatically设置和限制为10个项目
Source set progamatically and limited to 10 items
另外,如果有人知道如何迫使建议上的OnEnter事件可能是一个解决方案,编程显示
Alternatively if someone knows how to force the suggestions to show programatically on the OnEnter event that might be a solution
推荐答案
有在.NET API没有这样的可能性。更没有在 IAutoComplete 没有这样的可能性,外壳接口,.NET是内部使用。
There is no such possibility in .net api. Even more there is no such possibility in IAutoComplete shell interface which .net is using internally.
所以,你应该用它生活,或者实现你自己的自动完成的行为,而无需使用默认值。您可以使用组合框下拉为previously建议,甚至可以创建自己的自动完成控件(在我的应用程序选择的最后一个变量)。
So you should live with it, or implement you own auto-complete behaviour without using default one. You can use combo-box drop-down as previously suggested, or even create your own auto-complete control (in my application I chosen the last variant).
这篇关于如何使一个文本框显示自动完成建议空当的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!