tcl/tk 小部件组合框失去焦点

发布于 2024-07-24 06:43:18 字数 257 浏览 5 评论 0原文

除非您将鼠标移出 gui 并返回。

tcl/tk 小部件 iwidgets::combobox 有一个可怕的缺陷:当列表消失时,焦点就会从 gui 上移开,因此您无法在输入框中键入内容, 问题已在其他地方指出,但我还没有看到任何解决方案。
A。 有没有办法在退出命令(-command 选项)之前重新获得焦点? b. 有更好的组合框小部件可用吗? 我已经尝试过 BWidgets 的 ComboBox,但无法使其工作......我不想构建自己的组合框。

The tcl/tk widget iwidgets::combobox with a terrible flaw: when the list goes away, the focus goes away from the gui so you can't type in entry boxes unless you move the mouse out of the gui and back in.

This problem has been noted in other places, but I have not seen any solution.
a. is there a way to re-gain focus before exiting the command (-command option)?
b. is there a better combobox widget available? I have tried BWidgets' ComboBox but can't get that to work.... I don't want to have to build my own.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奶茶白久 2024-07-31 06:43:18

从 Tcl/Tk 8.5 开始,核心语言中内置了一个组合框小部件,作为小部件 Tile 集的一部分。 该命令是ttk::combobox。 您可以从 ActiveState 下载 Tcl/Tk 的预构建版本,网址为:

http://www.activestate.com/ activetcl/

有关详细信息,请参阅此处的文档:

http ://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_combobox.htm

HTH,

埃里克·梅尔斯基

As of Tcl/Tk 8.5, there is a combobox widget built into the core language as part of the Tile set of widgets. The command is ttk::combobox. You can download a prebuilt version of Tcl/Tk from ActiveState, at:

http://www.activestate.com/activetcl/

For more information, see the documentation here:

http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_combobox.htm

HTH,

Eric Melski

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文