forked from sujoyroyskr/Introduction-To-Tkinter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTkinter7.py
61 lines (44 loc) · 2.29 KB
/
Tkinter7.py
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
54
55
56
57
58
59
60
61
from tkinter import *
def printThis(): ### A fuction Created For further use
print("No Functionality Added For Now........Work in Progress")
root = Tk()
## Creating Main Menu and its Drop Down Through Tkinter
menu = Menu(root) ## Menu Bar to be made in root which is the main window
root.config(menu = menu)
subMenu = Menu(menu) ## Creating Submenu inside menu
menu.add_cascade(label="File", menu=subMenu) ## File is the 1st option in the Menu Bar
subMenu.add_command(label="Create New File....", command=printThis) ## SubMenu Created for the File
subMenu.add_command(label="Open File", command=printThis)
subMenu.add_command(label="Class Browser", command=printThis)
subMenu.add_command(label="Path Browser", command=printThis)
subMenu.add_command(label="Recent Opened Files", command=printThis)
subMenu.add_separator() ## Seperator is used to divide the Submenu into sections
subMenu.add_command(label="Save", command=printThis)
subMenu.add_command(label="Save As", command=printThis)
subMenu.add_command(label="Save Copy As", command=printThis)
subMenu.add_separator()
subMenu.add_command(label="Print Window", command=printThis)
subMenu.add_separator()
subMenu.add_command(label="Close", command=printThis)
subMenu.add_command(label="Exit", command=printThis)
subMenu2 = Menu(menu)
menu.add_cascade(label="Edit", menu=subMenu2)
subMenu2.add_command(label="Undo", command=printThis)
subMenu2.add_command(label="Redo", command=printThis)
subMenu2.add_separator()
subMenu2.add_command(label="Cut", command=printThis)
subMenu2.add_command(label="Copy", command=printThis)
subMenu2.add_command(label="Paste", command=printThis)
subMenu2.add_separator()
## Creating Toolbar Menu
toolbar = Frame(root, bg="black") ## Creating Toolbar in root
## Creating Button inside toolbar
insertButton = Button(toolbar, text="Insert New Cell", command=printThis)
insertButton.pack(side=LEFT, padx=2, pady=2)
insertButton2 = Button(toolbar, text="Print New Cell", command=printThis)
insertButton2.pack(side=LEFT, padx=2, pady=2)
toolbar.pack(side=TOP, fill=X)
## Creating Status Bar
status = Label(root, text="Work in Progress.........", bd=1, relief= SUNKEN, anchor=W) ##bd is borden and SUNKEN is to import/merge in screen
status.pack(side=BOTTOM, fill=X)
root.mainloop()