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.
Is there a way to get asynchronous auto-complete in a Winforms TextBox or ComboBox?
Share
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)