1

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

1 回答 1

1

查看此页面:http entryfield_entry_state=DISABLED ://www.gossamer-threads.com/lists/python/python/63351也为我工作以禁用组合框的条目。

于 2013-04-15T07:42:03.537 回答