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
TextChangedevent, send a request asynchronously to get the matching items, and change theAutoCompleteSourcewhen you get the result. You just need to be careful to access UI components on the UI thread, using theInvokemethod (or you can use aBackgroundWorkerand access the UI in theRunWorkerCompletedevent)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