I currently have a gui with a “Return Home” button, which is three lines:
def “funcX”(self):
self.pagey.pack_forget()
self.home.pack()
Which will “forget” Page Y and re-create Home.
But I don’t think I need to write this for every page in my program. Is there an elegant way to write:
self.”current”.pack_forget
which will forget whatever frame is current and open the Home frame?
Searched the tkinter literature and adjacent/relevant StackOverflow threads…all seem more focused on “destroying” windows or frames…
csc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.