Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我想从super class loginform中获取名为userE的条目的文本,以组成电子邮件类_Python_User Interface_Tkinter_Inheritance_Pycharm - Fatal编程技术网

Python 我想从super class loginform中获取名为userE的条目的文本,以组成电子邮件类

Python 我想从super class loginform中获取名为userE的条目的文本,以组成电子邮件类,python,user-interface,tkinter,inheritance,pycharm,Python,User Interface,Tkinter,Inheritance,Pycharm,这是我的超级类,删除了不必要的代码 类登录表单: 全局用户名 定义初始化(自,根): #=========================================================根目录===================================== self.root=根 self.root.geometry('1350x700+100+50') self.root.configure(background=“orange”) self.root.title(“

这是我的超级类,删除了不必要的代码

类登录表单:
全局用户名
定义初始化(自,根):
#=========================================================根目录=====================================
self.root=根
self.root.geometry('1350x700+100+50')
self.root.configure(background=“orange”)
self.root.title(“Bmail-登录/登录”)
self.userE=tk.Entry(master=frame,font=(“Verdana,Bold”,11),bg=“white”,fg=“grey”,width=50)
self.userE.place(x=90,y=355)
passl=tk.Label(text=“password:”,master=frame,font=(“Verdana,Bold”,11)).place(x=10,y=390)
def访问功能(自身、事件):
撰写电子邮件
我想访问self.userE.cget(“text”),但它不给我任何信息,绑定func错误或进入无限循环

这是我的composemail(child)类


请帮我解决这个问题……

这是太多的代码,我们无法调试。请删除所有不必要的详细信息。立即删除不必要的代码。请帮助我,而不是使用
self.userE.cget(“text”)
use
self.userE.get()
。不工作,数据被删除super().init()加载在compose class@thelizzardc的init中。请用完整的最小工作示例编辑您的问题?使用
super()。\uuu init\uuuu()
时删除数据是什么意思?也可能对你有帮助
   access = loginform
class compose_mail(access):
   def __init__(self, root):
    obj1=super().__init__(root)
    self.root = root
    self.root = Toplevel()
    self.root.title("Bmail-Compose Mail form")
    self.root.geometry("1350x700+100+50")
    self.root.resizable(False, False)
    self.root.configure(bg="orange")


    self.luser = Label(cframe, bg="yellow", width=50, text=self.acc)
    self.luser.place(x=20, y=650)
def acc(self):
    a=self.userE.cget("text")

root=tk.Tk()
obj=loginform(root)
obj.root.mainloop()