btnAddData=Button (Framebutton, text="Add Data", font=("arial", 12, "bold"), width=23, bg="blue", fg="white") btnAddData.grid(row=0,column=0)

btnAddData=Button (Framebutton, text="Show Data", font=("arial", 12, "bold"), width=23,bg="blue", fg="white") btnAddData.grid(row=0,column=1)

btnAddData=Button (Framebutton, text="Update", font=("arial", 12, "bold"), width=23,bg="blue", fg="white")
btnAddData.grid(row=0,column=2)

btnAddData=Button (Framebutton, text="Delete", font=("arial", 12, "bold"), width=23,bg="blue",fg="white")
btnAddData.grid(row=0,column=3)

btnAddData=Button (Framebutton, text="Reset", font=("arial", 12, "bold"), width=23,bg="blue", fg="white") btnAddData.grid(row=0,column=4)

btnAddData=Button (Framebutton, text="Exit", font=("arial", 12, "bold"), width=23,bg="blue", fg="white") btnAddData.grid(row=0,column=5)
self.library_table=ttk.Treeview(Table_frame, column=("memebertype","prnno", "title","firtname", "lastname", "adress1", "adress2","postid","mobile", "bookid", "booktitle","auther","dateborrowed", "datedue", "days","latereturnfine", "dateoverdue", "finalprice"),xscrollcommand=xscroll.set, yuscrollcommand=yscroll.set)


xscroll.pack(side=BOTTOM, fill=X)
yscroll.pack(side=RIGHT, fill=Y)
xscroll.config(command=self.library_table.xview)
yscroll.config(command=self.library_table.xview)


self.library_table.heading("memebertype", text="Member Type")

self.library_table.heading("prnno", text="PRN No." )
self.library_table.heading("title", text="Title")
self.library_table.heading("firtname", text="First Name")

self.library_table.heading("lastname", text="Last Name")
self.library_table.heading("adress1", text="Address1")
self.library_table.heading("adress2", text="Address2")

self.library_table.heading("postid", text="Post ID")

self.library_table.heading("mobile", text="Mobile Number")

self.library_table.heading("bookid", text="Book ID")

self.library_table.heading("booktitle", text="Book Title")
self.library_table.heading("auther", text="Auther")

self.library_table.heading("dateborrowed", text="Date Of Borrowed")
self.library_table.heading("datedue", text="Date Due")
self.library_table.heading("days", text="DaysOnBook")
self.library_table.heading("latereturnfine", text="LateReturnFine")
self.library_table.heading("dateoverdue", text="DateOverDue")
self.library_table.heading("finalprice", text="Final Price")
self.library_table["show"]="headings"

self.library_table.pack(fill=BOTH, expand=1)

self.library_table.column("memebertype", width=100)
self.library_table.column("prnno", width=100)
self.library_table.column("title", width=100)
self.library_table.column("firtname", width=100)
self.library_table.column("lastname", width=100)
self.library_table.column("adress1", width=100)
self.library_table.column("adress2", width=100)
self.library_table.column("postid", width=100)
self.library_table.column("mobile", width=100)
self.library_table.column("bookid", width=100)
self.library_table.column("booktitle", width=100)
self.library_table.column("auther", width=100)
self.library_table.column("dateborrowed", width=100)
self.library_table.column("datedue", width=100)
self.library_table.column("days", width=100)
self.library_table.column("latereturnfine", width=100)
self.library_table.column("dateoverdue", width=100)
self.library_table.column("finalprice", width=100)

Leave a comment