Hello all,

I've actually seen a few posts floating around the web (most of which are rather old and none of which were solved) about the same question that I'm having which is this:

I have a combobox that is populated with movies with a number corresponding to where it is held in our archives ie. "451 How The Grinch Stole Christmas"

What I would really like to do is have an autocomplete routine that would make it possible NOT to have autocomplete only work on the first character. As it stands, with Visual Studio's native autocomplete if my combobox is populated by:

Apple Smoothie
Banana Puree
Crayon Colors
Smooth Sailing
Pure Energy
Colors of The Wind

and I type "Pu" I will get only "Pure Energy" as an autocomplete result. I would like it so that typing "Pu" would return Pure Energy & Banana Puree.

If anyone has any idea how to do this I would really appreciate the help. Thank you in Advanced!

5 Years
Discussion Span
Last Post by lolafuertes

I would suggest the following to accomplish your desire:
1) Enable the key preview in the form
2) Capture the key press event on the combobox and there
a) Add the key value (character) to a filter string. Monitor for special characters like cursor movements, delete, back, etc.
b) Refill the combo with the relevant values according to the filter

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.