Repository navigation
Expand file tree
/
Copy pathpython_gui_10.py
More file actions
53 lines (33 loc) · 1.53 KB
/
Copy pathpython_gui_10.py
File metadata and controls
53 lines (33 loc) · 1.53 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#https://www.youtube.com/watch?v=D24Vx3_IM8U
from tkinter import *
def BigfootSays():
print("ROAR!!!")
root = Tk()
root.geometry("500x300") #change default size of root
#******************************************************Main Menu****************************************************#
Bigfoot_menu = Menu(root)
root.config(menu=Bigfoot_menu)
fileMenu = Menu(Bigfoot_menu)
Bigfoot_menu.add_cascade(label="File", menu=fileMenu)
fileMenu.add_command(label="Look for Bigfoot", command=BigfootSays)
fileMenu.add_separator()
fileMenu.add_command(label="Try to catch Bigfoot", command=BigfootSays)
fileMenu.add_separator()
fileMenu.add_command(label="Chase Bigfoot", command=BigfootSays)
fileMenu.add_separator()
fileMenu.add_command(label="Run away from Bigfoot!", command=BigfootSays)
editMenu = Menu(Bigfoot_menu)
Bigfoot_menu.add_cascade(label="Edit", menu=editMenu)
editMenu.add_command(label="Rethink tactics", command=BigfootSays)
editMenu.add_separator()
editMenu.add_command(label="Set traps")
editMenu.add_separator()
editMenu.add_command(label="Get a big gun")
#*******************************************************Toolbar*****************************************************#
toolbar = Frame(root, bg="pink")
insertHere = Button(toolbar, text="Tell your Bigfoot story", command = BigfootSays)
insertHere.pack(side= LEFT, padx=2, pady=2)#pad gives extra space
printHere = Button(toolbar, text="Contact a Bigfoot expert", command=BigfootSays)
printHere.pack(side=LEFT, padx=2, pady=2)
toolbar.pack(side=TOP, fill=X)
root.mainloop()