views:

265

answers:

1

I am using typeahead feature of TextBox .. all I want is that the Typeahead should show all the Items available in AutoCompleteStringCollection.

Currently its suggesting me those string whcih starts with the characters that I type. What I need is the characters that I type can exist anywhere in the string not only at beginning.

On TextChange Event What I am doing to get this is making a temp AutoCompleteStringCollection and associating it with the textBox.

Now all I need to do is just display that every time. any Ideas?

A: 

The Winform controls with AutoComplete support are using IE's AutoComplete APIs, which does not support ACO_NOPREFIXFILTERING until Windows Vista. Since WinForm needs to support earlier systems, ACO_NOPREFIXFILTERING is not supported in .Net.

If you want to use this feature when it is available, you can skip Windows Form's AutoComplete support and call the API directly.

Sheng Jiang 蒋晟