I'm having a trouble while implementing a log-in system in an interface I'm creating:
I want it to have two type of user: admin and user, so depending on what you choose you input your credentials and then if they're correct the system opens either the admin interface or the user interface.
My problem is that given the knowledge I have right now, I have to have a "mother window" while executing tkinter which is the first windows that opens when you run the program, in this case that mother window would be the log-in window, the thing is that if I close that log-in window once the user inputs his/her credentials, then the whole program doesn't work.
Is there a solution for this?
The simplest solution is to create two functions or two classes, one for the login window and one for the main window. Have these functions or classes return a single frame that contains everything needed for that part of the code.
Then, call the first function or class to login in, then destroy it and call the second function or class. When you destroy a frame, all of its children are also automatically destroyed.
Creating a log-in system using Tkinter