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.
-
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 theAutoCompleteSource
when you get the result. You just need to be careful to access UI components on the UI thread, using theInvoke
method (or you can use aBackgroundWorker
and access the UI in theRunWorkerCompleted
event)tster : wow, seems like such an oversight. -
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.
0 comments:
Post a Comment