自动填充文本框只接受c#.net窗口应用程序中的集合字符串文本 [英] autocomplete textbox wich only accepts collection string text in c#.net window application
本文介绍了自动填充文本框只接受c#.net窗口应用程序中的集合字符串文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文本框,应该只接受收藏字符串中的字符串
自动完成这样的
AutoCompleteStringCollection collection = {abhi,jeet,pratap};
所以我输入除a,j,p之外的任何字符(因为这些字符串中的第一个字符串) )
它不会输入文本框。
如果'a'按下那么下一个字符我们只会'b'因为'abhi '字符串后面有一个
并且它不接受任何字符然后'b'
i have a textbox which should only accepts charecters that are in collection string of
autocomplete like this
AutoCompleteStringCollection collection={abjeet,pratap};
so when i type any charecter except a,j,p (because these r first char in string)
it will not type in textbox.
and if 'a' pressed then next chracter would we only 'b' because 'abhi' string have b after a
and it not accept any char then 'b'
推荐答案
这里是我的建议链接:
三个自动完成实施比较 [ ^ ]
使用三元搜索树高效自动完成 [ ^ ]
如何创建高效的自动完成? [ ^ ]
我认为选择适合您需求的实现,而不是阻止用户按键。
祝你好运,
OI
Well here is my suggestion links:
Three Autocomplete implementations compared[^]
Efficient auto-complete with a ternary search tree[^]
How to create an efficient auto-complete?[^]
I think pick the implementation which suits your need instead of blocking user's key press.
Good luck,
OI
我使用可编辑的组合框
这篇关于自动填充文本框只接受c#.net窗口应用程序中的集合字符串文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文