Something is wrong with my CustomTkinter application, everything dissapears and if i remove this code it works but without my option menu. Can somebody say where i made a mistake?
choices = set()
for entry in df1["Cuisines"]:
choices.update([cuisine.strip() for cuisine in entry.split(",")])
cuisine_choice = tk.StringVar()
optionmenu = ctk.CTkOptionMenu(choice_window, cuisine_choice, *choices)
optionmenu.pack()
cuisine_choice.set("North Indian")
I need this option menu to be shown in my tkinter app
Note that the arguments required for
CTkOptionMenu(...)
is not the same as tkinterOptionMenu(...)
, the lineoptionmenu = ctk.CTkOptionMenu(choice_window, cuisine_choice, *choices)
should raise exception.Use below instead:
See the official document on CTkOptionMenu.