-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHome.py
More file actions
112 lines (104 loc) · 3.06 KB
/
Home.py
File metadata and controls
112 lines (104 loc) · 3.06 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from tkinter import *
from add_book import add_books
from update_book import update_books
from delete_book import delete_books
from issue_book import issue_books
from return_book import return_books
from search_book import search_book
def home():
main = Tk()
main.title("Library")
main.geometry("600x500")
main.configure(background="black")
head = Label(
main,
text="Library Management System",
bg="black",
fg="white",
font=("Courier", 25),
)
def goback():
for widget in search_books.winfo_children():
widget.destroy()
for widget in add_book.winfo_children():
widget.destroy()
for widget in update_book.winfo_children():
widget.destroy()
for widget in delete_book.winfo_children():
widget.destroy()
for widget in issue_book.winfo_children():
widget.destroy()
for widget in return_book.winfo_children():
widget.destroy()
home.pack(expand=1, fill=X)
add_book.pack_forget()
update_book.pack_forget()
delete_book.pack_forget()
issue_book.pack_forget()
return_book.pack_forget()
search_books.pack_forget()
Button(
main, text="back", bg="black", fg="white", font=("Courier", 25), command=goback
).pack(pady=12, side=TOP, anchor=NW)
head.pack(pady=20)
home = Frame(main)
search_books = Frame(main)
add_book = Frame(main)
update_book = Frame(main)
delete_book = Frame(main)
issue_book = Frame(main)
return_book = Frame(main)
def landing():
home.configure(background="black")
Button(
home,
text="search",
command=lambda: search_book(home, search_books),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
Button(
home,
text="add book",
command=lambda: add_books(home, add_book),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
Button(
home,
text="update book",
command=lambda: update_books(home, update_book),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
Button(
home,
text="delete book",
command=lambda: delete_books(home, delete_book),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
Button(
home,
text="issue book",
command=lambda: issue_books(home, issue_book),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
Button(
home,
text="return book",
command=lambda: return_books(home, return_book),
bg="black",
fg="white",
font=("Courier", 25),
).pack(pady=18)
home.pack(expand=1, fill=X)
landing()
main.mainloop()
home()