Need guidance on how to use Tkiner in visual studio. The tkiner program doesn't run, it shows as a syntax error. Code: from tkinter import* import tkinter.messagebox class Library: def __init_(self,root): self.root = root self.root.title("Library Inventory System") self.root.geometry("1350x750+0+0") BookId = StringVar() AuthorFullName=StringVar() PublicationYear=StringVar() BookTitle=StringVar() num_copies=StringVar() #===================Frames==========================# MainFrame = Frame(self.root) MainFrame.grid() TitleFrame = Frame(MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE) TitleFrame.pack(side=TOP) self.libTitle =Label(TitleFrame, font=('arial',46,'bold'),text="Library Inventory System") self.libTitle.grid(sticky=W) ButtonFrame =Frame(MainFrame,bd=2,width=1350,height=100,padx=20,pady=20,bg="Cadet Blue",relief=RIDGE) ButtonFrame.pack(side=BOTTOM) FrameDetail = Frame(MainFrame,bd=0,width=1350,height=50,padx=20,relief=RIDGE ) FrameDetail.pack(side=BOTTOM) DataFrame = Frame(MainFrame,bd=0,width=1350,height=400,padx=20,pady=20,relief=RIDGE ) DataFrame.pack(side=BOTTOM) DataFrameLEFT = LabelFrame(DataFrame,bd=1,width=800,height=300,padx=20,relief=RIDGE , font=('arial', 12,'bold'),text="Library Membership Info:",bg="Cadet Blue") DataFrameLEFT.pack(side=LEFT) DataFrameRIGHT = LabelFrame(DataFrame,bd=1,width=450,height=300,padx=20,pady=3,relief=RIDGE , font=('arial', 12,'bold'),bg="Cadet Blue",text="Book Detail:",) DataFrameRIGHT.pack(side=RIGHT) #===================Labels and Entries==========================# if __name__=='__main__': root =Tk() application = Library(root) root.mainloop() Error screenshot in the image.
Need guidance on how to use Tkiner in visual studio. The tkiner program doesn't run, it shows as a syntax error. Code: from tkinter import* import tkinter.messagebox class Library: def __init_(self,root): self.root = root self.root.title("Library Inventory System") self.root.geometry("1350x750+0+0") BookId = StringVar() AuthorFullName=StringVar() PublicationYear=StringVar() BookTitle=StringVar() num_copies=StringVar() #===================Frames==========================# MainFrame = Frame(self.root) MainFrame.grid() TitleFrame = Frame(MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE) TitleFrame.pack(side=TOP) self.libTitle =Label(TitleFrame, font=('arial',46,'bold'),text="Library Inventory System") self.libTitle.grid(sticky=W) ButtonFrame =Frame(MainFrame,bd=2,width=1350,height=100,padx=20,pady=20,bg="Cadet Blue",relief=RIDGE) ButtonFrame.pack(side=BOTTOM) FrameDetail = Frame(MainFrame,bd=0,width=1350,height=50,padx=20,relief=RIDGE ) FrameDetail.pack(side=BOTTOM) DataFrame = Frame(MainFrame,bd=0,width=1350,height=400,padx=20,pady=20,relief=RIDGE ) DataFrame.pack(side=BOTTOM) DataFrameLEFT = LabelFrame(DataFrame,bd=1,width=800,height=300,padx=20,relief=RIDGE , font=('arial', 12,'bold'),text="Library Membership Info:",bg="Cadet Blue") DataFrameLEFT.pack(side=LEFT) DataFrameRIGHT = LabelFrame(DataFrame,bd=1,width=450,height=300,padx=20,pady=3,relief=RIDGE , font=('arial', 12,'bold'),bg="Cadet Blue",text="Book Detail:",) DataFrameRIGHT.pack(side=RIGHT) #===================Labels and Entries==========================# if __name__=='__main__': root =Tk() application = Library(root) root.mainloop() Error screenshot in the image.
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
Related questions
Question
Need guidance on how to use Tkiner in visual studio.
The tkiner program doesn't run, it shows as a syntax error.
Code:
from tkinter import*
import tkinter.messagebox
class Library:
def __init_(self,root):
self.root = root
self.root.title("Library Inventory System")
self.root.geometry("1350x750+0+0")
BookId = StringVar()
AuthorFullName=StringVar()
PublicationYear=StringVar()
BookTitle=StringVar()
num_copies=StringVar()
#===================Frames==========================#
MainFrame = Frame(self.root)
MainFrame.grid()
TitleFrame = Frame(MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE)
TitleFrame.pack(side=TOP)
self.libTitle =Label(TitleFrame, font=('arial',46,'bold'),text="Library Inventory System")
self.libTitle.grid(sticky=W)
ButtonFrame =Frame(MainFrame,bd=2,width=1350,height=100,padx=20,pady=20,bg="Cadet Blue",relief=RIDGE)
ButtonFrame.pack(side=BOTTOM)
FrameDetail = Frame(MainFrame,bd=0,width=1350,height=50,padx=20,relief=RIDGE )
FrameDetail.pack(side=BOTTOM)
DataFrame = Frame(MainFrame,bd=0,width=1350,height=400,padx=20,pady=20,relief=RIDGE )
DataFrame.pack(side=BOTTOM)
DataFrameLEFT = LabelFrame(DataFrame,bd=1,width=800,height=300,padx=20,relief=RIDGE
, font=('arial', 12,'bold'),text="Library Membership Info:",bg="Cadet Blue")
DataFrameLEFT.pack(side=LEFT)
DataFrameRIGHT = LabelFrame(DataFrame,bd=1,width=450,height=300,padx=20,pady=3,relief=RIDGE
, font=('arial', 12,'bold'),bg="Cadet Blue",text="Book Detail:",)
DataFrameRIGHT.pack(side=RIGHT)
#===================Labels and Entries==========================#
if __name__=='__main__':
root =Tk()
application = Library(root)
root.mainloop()
Error screenshot in the image.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning