im working on a github project but its not going so well.
this code:
from tkinter import *
def NewFile():
new = Label(root, text="about \n")
def OpenFile():
openf = Label(root, text="about \n")
def About():
about = Label(root, text="about \n")
root = Tk()
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New", command=NewFile)
filemenu.add_command(label="Open...", command=OpenFile)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=root.quit)
helpmenu = Menu(menu)
menu.add_cascade(label="Help", menu=helpmenu)
helpmenu.add_command(label="About...", command=About)
body = Label(root, text="")
mainloop()
Doesnt work how I need it.
its suposed to write certant messages when you click file > new
, file > open
and help > about
.
IT DOES NOTHING
how can I make it do what I want?