How can i create a drop-down menu in Tkinter?
Niloofar24
15
Posting Whiz
Recommended Answers
Jump to PostI think it's called an OptionMenu ...
''' tk_OptionMenu1.py using Tkinter's Optionmenu() as a combobox allows one item to be selected use a button to show selection ''' try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk def ok(): sf = …
Jump to PostMake sure the data is presented to the OptionMenu() as a list that is unpacked with the * operator. Testprint choices and use *choices as an argument.
All 6 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Niloofar24
15
Posting Whiz
Niloofar24
15
Posting Whiz
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Niloofar24
15
Posting Whiz
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Ene Uran
commented:
Sharp
+12
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.