views:

760

answers:

2

I am using TextBoxes's AutoComplete Suggest mode property to make it AutoComplete, What I want to achieve with it is a user can type any word which can pe part of the whole string and based on that It should show me the lookup.

With TextBox AutoSuggest Source set to Custom Source and AutoSuggest mode set to Suggest Mode I can only get loopups for those string which starts with the word that user types.

Is there a way using which I can just tweak/override the functionality of these properties or is there any other option available.

I am using C# - WinForms

+1  A: 

The best option I see would be to create your own implementation of IAutoComplete. Here is info on it: http://msdn.microsoft.com/en-us/library/bb776292%28VS.85%29.aspx

If you were to look at System.Windows.Forms.dll in a .net disassembler you will see that under the covers it is using SHAutoComplete, which is also mentioned in that link.

Also you can do some searches for some code samples of people creating their own IAutoComplete implementations.

Let me know if you come up with anything else.

Jon
A: 

Check this link for an example: AutoComplete RichTextBox (haven't tested it though).

Groo