tcl/tk 小部件組合框失去焦點 (tcl/tk widget combobox loses focus)


問題描述

tcl/tk 小部件組合框失去焦點 (tcl/tk widget combobox loses focus)

tcl/tk 小部件 iwidgets::combobox 有一個可怕的缺陷:當列表消失時,焦點會從 gui 上移開,因此除非您將鼠標移出 gui 並移回,否則您無法輸入輸入框

這個問題在其他地方已經註意到了,但是我沒有看到任何解決方案。 a. 有沒有辦法在退出命令(‑command 選項)之前重新獲得焦點?灣。是否有更好的組合框小部件可用?我已經嘗試過 BWidgets 的 ComboBox,但無法讓它發揮作用....我不想自己構建。


參考解法

方法 1:

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

(by Byron CalozEric Melski)

參考文件

  1. tcl/tk widget combobox loses focus (CC BY‑SA 2.5/3.0/4.0)

#Combobox #widget #tk #TCL






相關問題

tcl/tk 小部件組合框失去焦點 (tcl/tk widget combobox loses focus)

Flex Combobox 奇怪的問題 (Flex Combobox strange problem)

在組合框中對齊文本 (Align Text in Combobox)

如何同時綁定到 ComboBox 中的兩個不同的依賴屬性? (How do I bind to two different dependency properties in a ComboBox at the same time?)

在綁定到字典的組合框中設置所選項目 (Setting selected item in combobox bound to dictionary)

easyUI datagrid內部編輯組合框無法選擇默認值 (easyUI datagrid inner edit combobox cannot selected default value)

VBA:數據輸入組合框有效,但命令按鈕給出“無效的屬性值”錯誤 (VBA: Data entry into combobox works, but command button gives "Invalid property value" error)

vb.net - 組合框總是選擇第一個值 (vb.net - combo box always select the first value)

打開 ComboBox DropDown 時不要選擇文本輸入 (Do not select text input when ComboBox DropDown is opened)

如何使用相同的數據源設置多個組合框? (How can I set up multiple combo-boxes with the same data source?)

如何使用 QtreeView 在 QComboBox 中設置所選項目 (How to set selected item in QComboBox with QtreeView)

Tkinter 組合框 Python (Tkinter Combobox Python)







留言討論