-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
37 lines (27 loc) · 1 KB
/
gui.py
File metadata and controls
37 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from tkinter import *
# class Application:
# def __init__(self, master):
# frame = Frame(master)
# frame.pack()
# self.print_button = Button(frame, text="Print Message", command=self.print_message)
# self.print_button.pack(side=LEFT)
# self.quit_button = Button(frame, text="Quit", command=frame.quit)
# self.quit_button.pack(side=LEFT)
# def print_message(self):
# print("Hey this is working!")
root = Tk()
menu = Menu(root)
root.config(menu=menu)
def do_nothing():
print("I am doing nothing")
sub_menu = Menu(menu)
sub_menu.add_cascade(label="File", menu=sub_menu)
sub_menu.add_command(label="New...", command=do_nothing)
# sub_menu.add_command(label="New project", command=do_nothing)
# sub_menu.add_separator()
# sub_menu.add_command(text="Quit", command=root.quit)
# edit_menu = Menu(menu)
# menu.add_cascade(label="Edit", menu=edit_menu)
# edit_menu.add_command(label="Redo", command=do_nothing)
# app = Application(root)
root.mainloop()