开发者

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 o开发者_运维知识库r 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜