Molloch
Molloch

Reputation: 2381

Load Combobox items Dynamically on KeyPress

I want to create a combobox like winform control in VB.Net that makes suggestions dynamically; exactly as the address bar does in Google Chrome or IE 8/9. Basically on each keypress, get a list of items that match the entered text on a background thread(s) and show these items in the dropdown list as they are (possibly slowly) returned - either from DB queries, web services etc.

I have tried a couple of ideas, changing the AutoComplete list dynamically or binding to a list, which I then update. But I am getting some rather odd and incorrect results even when updating the list directly (on the main thread). I also tried implementing my own textbox control that shows a ListBox control where the dropdown would appear - this seemed a lot more reliable but I cannot get it to draw over the edge of forms etc when shown, as the combobox drop-down does.

Has any one achieved similar functionality? Where do I start?

Upvotes: 1

Views: 2134

Answers (1)

bla
bla

Reputation: 5480

This could be what you are looking for: AutoComplete ComboBox in VB.Net

Upvotes: 2

Related Questions