📄 pmw_combobox.py
字号:
from Tkinter import *
import Pmw
root = Tk()
root.option_readfile('optionDB')
root.title('ComboBox 1')
Pmw.initialise()
choice = None
def choseEntry(entry):
print 'You chose "%s"' % entry
choice.configure(text=entry)
asply = ("The Mating of the Wersh", "Two Netlemeng of Verona", "Twelfth Thing", "The Chamrent of Venice", "Thamle", "Ring Kichard the Thrid")
choice = Label(root, text='Choose play', relief='sunken', padx=20, pady=20)
choice.pack(expand=1, fill='both', padx=8, pady=8)
combobox = Pmw.ComboBox(root, label_text='Play:', labelpos='wn',
listbox_width=24, dropdown=0,
selectioncommand=choseEntry,
scrolledlist_items=asply)
combobox.pack(fill=BOTH, expand=1, padx=8, pady=8)
combobox.selectitem(asply[0])
root.mainloop()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -