wxPython中文本ctrl的动态建议?
有没有办法模仿谷歌搜索字段的动态建议行为?例如,我在文本 ctrl 中输入一些内容,下面会弹出一个建议列表供用户选择?如果 wxPython 没有这样的功能,也许其他一些 Python gui 有它?
编辑:适用于 Mac。这不包括 this 示例,尽管它似乎正是我正在寻找的。
Is there any way to mimic the dynamic suggestions behavior as per the search field on Google? As in, I type something in a text ctrl, and a list of suggestions pops up below for the user to chose from? If wxPython doesn't have such a feature, perhaps some other Python gui has it?
EDIT: For use on a Mac. That excludes this example, although it seems to be exactly what I am looking for.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定是否有一种方法可以自动执行此操作,但我认为通过绑定到
EVT_TEXT
可以轻松实现。这是来自 wxpython wiki 的 TextCtrlAutoComplete 控件的配方
Im not sure it theres a way to automatically do this but I think it could be easily achieved by binding to
EVT_TEXT
.This is a recipe from the wxpython wiki for a TextCtrlAutoComplete control
您是否尝试过AutocompleteTextCtrl?
您可以快速下载并测试它,因为它带有一个很好的测试模块,可以立即运行。
Have you tried AutocompleteTextCtrl?
You could quickly download and test it as it comes with a nice test module to run straight away.