468,765 Members | 802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

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 2128
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
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.