python optionmenu tkinter

Solutions on MaxInterview for python optionmenu tkinter by the best coders in the world

showing results for - "python optionmenu tkinter"
Coline
21 Mar 2018
1from tkinter import Tk, StringVar, OptionMenu, mainloop
2parent = Tk()
3varList = StringVar(parent)
4varList.set("Red")
5om = OptionMenu(parent, varList, "Yellow", "Pink", "RED", "Brown", "Black", "Blue")
6om.pack()
7parent.mainloop()