Skip to content
Advertisement

Error while creating a menu in Python using TkInter. What am I doing wrong?

I’m having an error while creating a menu in Python using Tkinter. What am I doing wrong? My code and complete error traceback are given below.

My code:

JavaScript

The error:

JavaScript

What does this error mean? What am I doing wrong, and how can I fix it?

Thank you so much!!

Advertisement

Answer

JavaScript

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.

JavaScript

Additionally, nav.add_casacde(label="Cuisines", menu=navcuisine) misspells “cascade”. Try nav.add_cascade(label="Cuisines", menu=navcuisine) instead.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement