Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C# combobox
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.
 
Thanks.
 
- Roy
Posted 14-Mar-13 18:09pm
rmw256289
Comments
Matthew Faithfull at 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
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 14 Mar 2013
Copyright © CodeProject, 1999-2014
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