Server IP : 68.65.122.142 / Your IP : 18.222.178.70 Web Server : LiteSpeed System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : glenirhm ( 1318) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /var/../lib64/python3.8/pydoc_data/../html/../../gio/../python2.7/Demo/tkinter/guido/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
# option menu sample (Fredrik Lundh, September 1997) from Tkinter import * root = Tk() # # standard usage var1 = StringVar() var1.set("One") # default selection menu1 = OptionMenu(root, var1, "One", "Two", "Three") menu1.pack() # # initialize from a sequence CHOICES = "Aah", "Bee", "Cee", "Dee", "Eff" var2 = StringVar() var2.set(CHOICES[0]) menu2 = apply(OptionMenu, (root, var2) + tuple(CHOICES)) menu2.pack() root.mainloop()