哈哈,首先要设置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。

相关文章:

  • 2022-01-08
  • 2021-09-12
  • 2021-11-08
  • 2021-07-07
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-05-19
  • 2021-09-29
相关资源
相似解决方案