Hola, tenemos la solución a tu interrogante, desplázate y la obtendrás aquí.
Ejemplo 1: menú desplegable en tkinter
from Tkinter import*
master = Tk()
variable = StringVar(master)
variable.set("one")# default value
w = OptionMenu(master, variable,"one","two","three")
w.pack()
mainloop()
Ejemplo 2: cómo hacer un cuadro desplegable tkinter
from tkinter import*from tkinter import ttk
screen = Tk()
my_weekdays_names =["MONDAY","TUESDAY","WENSDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]defweekdaySelection(event):for x inrange(7):if weekdaysDropdown.get()== my_weekdays_names[x]:print(my_weekdays_names[x])
weekdaysDropdown = ttk.Combobox(screen, values = my_weekdays_names)
weekdaysDropdown.current(1)
weekdaysDropdown.bind("<>" , weekdaySelection)
weekdaysDropdown.grid()
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)