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!

Recommended Answers

All 2 Replies

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

Hello did this problem solved? I have the same problem also. Could you help me?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.