0

我无法在多行文本框中实现自动建议功能。请帮忙?

 public void autoComplete()
        {

        AutoCompleteStringCollection AutoItem = new AutoCompleteStringCollection();
        string s;           
        StreamReader reader = File.OpenText("E:/try/AutoSuggest.txt");
        while ((s = reader.ReadLine()) != null)
        {

                AutoItem.Add(s);

        }


        textBox1.AutoCompleteMode = AutoCompleteMode.Suggest; ;
         textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
         textBox1.AutoCompleteCustomSource = AutoItem;           

    }

这是单行文本框,想在多行中实现吗?

4

0 回答 0