forked from mayagopanlek/Simple-Library-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome12.py
More file actions
42 lines (41 loc) · 891 Bytes
/
home12.py
File metadata and controls
42 lines (41 loc) · 891 Bytes
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
import tkinter as tk
from tkinter import ttk
#window creation
win=tk.Tk()
win.geometry("300x150")
#function1
def af():
win1=tk.Tk()
win1.mainloop()
#function2
def bf():
win2=tk.Tk()
win2.mainloop()
#function3
def cf():
win3=tk.Tk()
win3.mainloop()
#function4
def df():
win4=tk.Tk()
win4.mainloop()
#function5
def vf():
win5=tk.Tk()
win5.mainloop()
#Button1
action=ttk.Button(win, text="Insert book", command=af)
action.grid(column=0, row=0)
#Button2
action=ttk.Button(win, text="create an account", command=bf)
action.grid(column=0, row=2)
#Button3
action=ttk.Button(win, text="Issue book", command=cf)
action.grid(column=0, row=4)
#Button4
action=ttk.Button(win, text="Return book", command=df)
action.grid(column=0, row=8)
#Button5
action=ttk.Button(win, text="View details", command=vf)
action.grid(column=0, row=12)
win.mainloop()