Text Box work as like as a Combobox
  • hi my friends to i found something new. I hope it will use your valuable code.How to text box work as a combo box. for eg if the user enter the first letter of the name (if press "a" relevant values will display

     private void Form1_Load(object sender, EventArgs e)

            {

                tbCountry.AutoCompleteMode = AutoCompleteMode.Suggest;

                tbCountry.AutoCompleteSource = AutoCompleteSource.CustomSource;

               tbCountry.AutoCompleteCustomSource = CountryList();

            }

     

            private  AutoCompleteStringCollection CountryList()

            {

                AutoCompleteStringCollection List = new AutoCompleteStringCollection();

                List.Add("Albania");

                List.Add("Algeria");

                List.Add("America");

                List.Add("Angolia");

                List.Add("Antartica");

                List.Add("Australia");

                List.Add("India");

     

                return List;

            }



Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

Optimum Creative