0

I am unable to implement the auto suggest functionality in MultiLine Text Box. Please Help?

 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;           

    }

This is for Single line Text Box, want to implement in Multiline?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
user1747819
  • 301
  • 1
  • 5
  • 11
  • `AutoCompleteSource` doesn't work with multiline textboxes so you'll have to create your own as shown [here](http://stackoverflow.com/questions/12972761/textbox-auto-complete-multi-line) or, for RTB, see [this post](http://forum.codecall.net/topic/55750-c-tutorial-creating-a-auto-completing-richtextbox/) – keyboardP Jul 01 '13 at 13:47
  • What's the problem you're having with your code? – Dan Puzey Jul 01 '13 at 13:47
  • want to implement it for multiline rather than just single kline – user1747819 Jul 01 '13 at 13:54

0 Answers0