📜  tkinter 中的下拉菜单 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.341000             🧑  作者: Mango

代码示例1
from Tkinter import *

master = Tk()

variable = StringVar(master)
variable.set("one") # default value

w = OptionMenu(master, variable, "one", "two", "three")
w.pack()

mainloop()