Is there a way to get asynchronous auto-complete in a Winforms TextBox or ComboBox? AJAX is so nice, and I would be amazed if the .NET framework doesn't have a thick client equivalent.
+1
A:
There's no such feature out of the box, but it shouldn't be too hard to implement it yourself... Handle the TextChanged
event, send a request asynchronously to get the matching items, and change the AutoCompleteSource
when you get the result. You just need to be careful to access UI components on the UI thread, using the Invoke
method (or you can use a BackgroundWorker
and access the UI in the RunWorkerCompleted
event)
Thomas Levesque
2010-01-16 22:13:17
wow, seems like such an oversight.
tster
2010-01-16 22:18:15
A:
I know that in MFC you can use SHAutoComplete and the shell will do it for you. However I'm not sure the best way to do this in WinForms, but it should be possible.
See this question and this one for some more info.
Matt Warren
2010-01-18 11:45:16