471,062 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,062 software developers and data experts.

Create Auto Complete Textbox

Hi

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

Please help.

Regards
Melson
May 5 '06 #1
1 2167
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.

Similar topics

reply views Thread by Alex Moskalyuk | last post: by
reply views Thread by george d lake | last post: by
8 posts views Thread by John | last post: by
4 posts views Thread by Benny | last post: by
6 posts views Thread by Smithers | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.