开发者

Auto-Completion In wxPython wxComboBox

I've been trying to make a ComboBox which would suggest options as you type, much like an IDE's code suggestions/code-sense, or googles suggestions when you type in a search.

The suggestions would be the items from the ComboBox dropdown, which contained the substring typed in the text box of the ComboBox.

I've tried to make a ComboBox do it, with no luck, I've tried the masked ComboBoxes, and have even tried to subclass the ComboCrtl, but I've always run into troubles either performance wise or not being able to do what I want at all

I have around 2500 items in my list of items (suggestions), and simply clearing the ComboBox and inserting the items which match is way too slow.

How would I go about making such a ComboBox, or is there even a built-in feature i could use?

开发者_如何学运维I can allow a small delay before the suggestions are shown, but the whole window hanging for a second or two is not acceptable, in my oppinion.


Few years ago I made a control like this by subclassing TextCtrl. It supports HTML formating for suggestions. Here you go.

There is also the Combo Box that Suggests Options

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜