Error while creating a menu in Python using TkInter. What am I doing wrong?
navigation = Frame(main, bg="floral white")navigation.grid(padx=20)nav = Menu(navigation)navigation.config(menu=nav)
This is a problem. Frame objects do not support the menu
configuration option. As far as I know, only Toplevel widgets allow menu
. One possible solution is to make nav
a menu of root
instead.
nav = Menu(root)root.config(menu=nav)
Additionally, nav.add_casacde(label="Cuisines", menu=navcuisine)
misspells "cascade". Try nav.add_cascade(label="Cuisines", menu=navcuisine)
instead.