I wrote this simple code using grid(), but there seem to be a problem and shows the error :
class Input_screen:
def __init__(self,master):
frame = Frame(master)
frame.pack()
self.name_lable = Label(frame,text = 'NAME')
self.name_e = Entry(root)
self.name_lable.grid(row=1,column=0,sticky=W)
self.name_e.grid(row=1,column=1)
root = Tk()
b = Input_screen(root)
root.mainloop()
TclError: cannot use geometry manager grid inside . which already has slaves managed by pack
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…