Click here to Skip to main content
15,113,214 members
Articles / Programming Languages / C#
Tip/Trick
Posted 25 Dec 2010

Tagged as

Stats

23.5K views
4 bookmarked

Auto Complete Textbox

Rate me:
Please Sign up or sign in to vote.
3.29/5 (6 votes)
5 Jan 2011CPOL
Auto Fill the content of text box for well known entries
The auto complete feature of the text box allows the user to enter part of the details in the text box and complete the remaining automatically. Say for example a country text box, which will fill the entry India when the first two letters are typed. There are two important ways in which we can save the typing. One is auto complete by filling the remaining text and the other one is providing a suggestion in the form a matching list to pick the correct one.

For example, have a look at the form: http://www.stooorage.com/show/650/1558564_pic1.jpg[^].

A: For the first text box, set the following properties:
1) Set CustomSource value for the property Autocompletesource
2) Set Append value for the property AutoCompleteMode. You can try other options also
3) Set the below specified value for the Property AutoCompleteCustomSource
Murali Manohar
Mike Starr
Robert Smith
John Paul
Mary Jane
Muthiyah

B: For the second text box, try different auto complete mode:
1) Run the Application
2) In the First text box, type only the letter M

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sivaraman Dhamodharan
Software Developer iSOFT
India India
I am working as software engineer in iSOFT R&D. I have been come across C++,MFC, .net technologies. I do like playing video games, reading books.

Web: www.mstecharticles.com


Comments and Discussions

 
GeneralCan I declaritivity require that the user select from the li... Pin
Pat Tormey3-Feb-11 3:14
MemberPat Tormey3-Feb-11 3:14 
GeneralReason for my vote of 3 It's a good one for an experienced p... Pin
Pravin Patil, Mumbai6-Jan-11 22:58
MemberPravin Patil, Mumbai6-Jan-11 22:58 
GeneralThanks walt and Manfred. Pin
Sivaraman Dhamodharan28-Dec-10 1:55
MemberSivaraman Dhamodharan28-Dec-10 1:55 
GeneralActually this needs some more detail to be useful, but it's ... Pin
Dr.Walt Fair, PE27-Dec-10 14:22
professionalDr.Walt Fair, PE27-Dec-10 14:22 
GeneralReason for my vote of 1 Poor representation... Pin
maq_rohit26-Dec-10 2:27
professionalmaq_rohit26-Dec-10 2:27 
GeneralThanks Manfred R. Bihy. Pin
Sivaraman Dhamodharan26-Dec-10 0:30
MemberSivaraman Dhamodharan26-Dec-10 0:30 
GeneralYou can visit my Blog: http:\\Sivaramand.blogspot.com. It wa... Pin
PeteSon_Q26-Dec-10 0:28
MemberPeteSon_Q26-Dec-10 0:28 
GeneralMy reason for a vote of 2: The tip could have been a little ... Pin
Manfred Rudolf Bihy25-Dec-10 23:56
professionalManfred Rudolf Bihy25-Dec-10 23:56 
GeneralReason for my vote of 2 Too incomplete, and incomprehensible... Pin
Manfred Rudolf Bihy25-Dec-10 23:52
professionalManfred Rudolf Bihy25-Dec-10 23:52 
QuestionWhat will happen to duplicates ?? Pin
nethsu23-Mar-11 0:14
Membernethsu23-Mar-11 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.