python 3.x - Error <Class> has not attribute <method> in Tkinter -
i trying link tkinter frame one, error
attributeerror: 'mainscreen' object has no attribute 'nextscreen'
my code below :
what meaning of error?
from tkinter import ttk tkinter import * import tkinter import imap class mainscreen(): def __init__(self,tkgui): global w,x self.tkgui =tkgui tkgui.configure(background='red') label(tkgui,text='please enter email',bg='red',fg='white').grid(row=0,column=2) e=entry(tkgui,width=20) e.grid(row=1,column=2) w=e.get() print(w) label(tkgui,text='please enter password',bg='red',fg='white').grid(row=2,column=2) p=entry(tkgui,width=20,show='*') p.grid(row=3,column=2,sticky=w) x=p.get() button(tkgui,text="sign on").grid(row=5,column=2) button.bind('<button>',self.nextscreen()) def nexscreen(self,event): inboxscreen=imap.signin(w,x) tkgui=tkinter.tk() app=mainscreen(tkgui) tkgui.mainloop()
it looks though have typo. in code, function named nexscreen
call nextscreen
Comments
Post a Comment