I'm trying to create an interface where the user can type text and save that text in a txt document. To make the process easier, I used a GUI generator called PAGE, which uses the package TKinter, which already comes with Python. The code generated by PAGE was as follows:
class New_Toplevel:
def __init__(self, top=None):
self.Text1 = Text(top)
self.Text1.place(relx=0.017, rely=0.133, relheight=0.831,
relwidth=0.94)
self.Text1.configure(background="white")
self.Text1.configure(font="TkTextFont")
self.Text1.configure(foreground="black")
self.Text1.configure(highlightbackground="#d9d9d9")
self.Text1.configure(highlightcolor="black")
self.Text1.configure(insertbackground="black")
self.Text1.configure(selectbackground="#c4c4c4")
self.Text1.configure(selectforeground="black")
self.Text1.configure(width=564)
self.Text1.configure(wrap=WORD)
The problem is that I can not recover the text from the window. I tried to use the get () method, but it does not return anything, and I can not call the Text1 object from outside the class, so I can use the solution they gave in this post: link
Any solution?