Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2006

Tip: Looking for answers? Try searching our database.

Autocomplete textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Strider - 30 Jan 2006 13:00 GMT
Hello all!

I'm looking for ideas on implementing a textbox with autocomplete
functionality, just like the one found in Excel.

As the user types values into the textbox a lookup for matching values
is performed. For example lets assume that the user types the character
'1' and that the candidate values are '01', '02', '03', '10', '12' etc.

I need the textbox to display the first candidate value that partially matches
the characters typed ('01'). The cursor should be located at the end of the
user typed value (1|0) and the rest of the text must be selected.
As the user goes on typing, the selected text is replaced with the typed
character and the lookup
is performed again.

I am very close. I use the Textbox.SelectionStart and
Textbox.SelectionLength properties but the problem is that the caret is
allways placed at the end of the selection when I need it to be located at
the begining.

Any Ideas?

Thanks!

PS: I cannot use a combobox!
dbuchanan - 31 Jan 2006 21:43 GMT
Strider,

You can do this with the ComboBox. It is a very versatile control.
Check out "How to: Create Lookup Tables" in help for one way to do it.
I'm not sure but I think you can hide the drop down arrow and keep the
capability.

Doug

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.