我正在寻找一种禁用直接编辑Pmw.ComboBox
小部件的方法。使用entry_field=DISABLED
结果的窗口小部件配置带有灰色且无法使用的ComboBox。这是我的代码,允许直接编辑菜单:
dropdownQOS = Pmw.ComboBox(parentWindow,
label_text = 'QOS: ',
labelpos = 'w',
selectioncommand = differentiateSettings,
scrolledlist_items = ("Selection1", "Selection2", "Selection3"),
listheight = 57, entry_width = 43)
dropdownQOS.selectitem(0, setentry = 1)
dropdownQOS.pack(anchor = 'n',fill = 'x', expand = 1, padx = 50, pady=5)
答案 0 :(得分:1)
查看此页面:http://www.gossamer-threads.com/lists/python/python/63351
entryfield_entry_state=DISABLED
也为我工作,禁用组合框输入。