By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Create Auto Complete Textbox

P: n/a
Hi

Can anyone help please. How can I create a Auto complete textbox using C#.

Please help.

Regards
Melson
May 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Set the AutoCompleteCustomSource
http://msdn2.microsoft.com/en-US/lib...tomsource.aspx
to a string collection of the items that can be used for autocompletion. You
can also use the AutoCompleteSource for some common items.

This code should get you started ...
m_List = new AutoCompleteStringCollection();

m_List.Add("Red");

m_List.Add("Royal Blue");

m_List.Add("Pink");

m_List.Add("Blue");

m_List.Add("Purple");

m_List.Add("Orange");

m_List.Add("Green");

this.textBox1.AutoCompleteCustomSource = m_List;

this.textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;

this.textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
You set the AutoComplete
"Melson" <we****@hotmail.com> wrote in message
news:u9**************@TK2MSFTNGP02.phx.gbl...
Hi

Can anyone help please. How can I create a Auto complete textbox using C#.

Please help.

Regards
Melson

May 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.