Click here to Skip to main content
13,089,943 members (42,207 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am looking for a ComboBox with the following properties:

1). The drop-down list of existing possibilities changes dynamically (each key-stroke) as the text changes in the box. The displayed list consists of all elements whose beginnings match what has been entered so far. (If no match, the list is empty.) The mere fact of text being entered causes the drop-down list to appear and "highlights" its first element, but leaves the editting cursor at the end of the entered text to allow further input. Ideally the currently highlighted list element could be changed without affecting the input.

2). Some "special character" (esc/tab/space/???) causes the input to be completed to match the currently highlighted list element. It would be nice if this completion would be up to the next delimiter (e.g. period/comma/space/???), but I'll not be picky. Despite completing the input, the cursor should remain in the box to allow further editting of the text.

I've looked on this site and the web, and while I don't pretend my search has been exhaustive, I've not been able to find what I'm looking for (or even close enough for me to be able to figure out how to modify).

Thanks for any assistance you may be able to provide.

And if you decide to delete this without an answer, please have the decency to let me know why.


- Roy
Posted 14-Mar-13 17:09pm
Matthew Faithfull 15-Mar-13 3:11am
While there may well be one out there somewhere now, there wasn't when a colleague of mine wrote one about 15 years ago. I can't give it to you as it's commercial property and it isn't quite what you want as it's custom drawn as well but I can tell you that the input-sensitive part worked pretty much as you describe and that it was a good idea. These lists were fast and useful even when they contained 100,000 items. In other words you're on to a good idea, it can be done and it doesn't take a great deal of code.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 14 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100