Ciao a tutti sto imparnado da poco Python e stavo esercidandomi sulla realizzazion idi menu:
Codice PHP:
from tkinter import *
def new_menu_file():
pass
root = Tk()
root.title = "Prova finesta più menù"
root.attributes("-fullscreen", True)
nav = Menu(root)
root.config(menu=nav)
menu_file = Menu(nav)
nav.add_cascade(Label = "File", menu=menu_file)
menu_file.add_command(Label = "Nuovo...", command=new_menu_file)
menu_file.add_command(Label = "Esci", command=root.quit)
root.mainloop()
mi da questo errore:
nav.add_cascade(Label="File", menu=menu_file)