


















哈哈,首先要设置TextBox的AutoCompleteMode为Suggest
AutoCompleteSource为CustomSource。
然后就写代码了:)
private void Form1_Load(object sender, EventArgs e)
{
AutoCompleteStringCollection collection = new AutoCompleteStringCollection();
textBox2.AutoCompleteCustomSource = collection;
collection.AddRange(new string[] { "a", "aaa", "aaaa", "aaaaa", "aaaaaa", "aaaaaaaaccc" });
}
嗷嗷简单吧。
不多说了。
郁闷,我的博客出了BUG。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。