Browse Source

ajout

master
BARRAUX Arthur 3 years ago
parent
commit
7d374a2df7
  1. 27
      test.py

27
test.py

@ -1,27 +0,0 @@
from tkinter import *
class Window(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.master = master
menu = Menu(self.master)
self.master.config(menu=menu)
fileMenu = Menu(menu)
fileMenu.add_command(label="Item")
fileMenu.add_command(label="Exit", command=self.exitProgram)
menu.add_cascade(label="File", menu=fileMenu)
editMenu = Menu(menu)
editMenu.add_command(label="Undo")
editMenu.add_command(label="Redo")
menu.add_cascade(label="Edit", menu=editMenu)
def exitProgram(self):
exit()
root = Tk()
app = Window(root)
root.wm_title("Tkinter window")
root.mainloop()
Loading…
Cancel
Save