我正在寻找一种方法来禁用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)