Answers for "menù a tendina tkinter"

0

menù a tendina tkinter

pythonCopyimport tkinter as tk

OptionList = [
"Aries",
"Taurus",
"Gemini",
"Cancer"
] 

app = tk.Tk()

app.geometry('100x200')

variable = tk.StringVar(app)
variable.set(OptionList[0])

opt = tk.OptionMenu(app, variable, *OptionList)
opt.config(width=90, font=('Helvetica', 12))
opt.pack()

app.mainloop()
Posted by: Guest on May-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language