Hi I am developing a single login in python using Tkinter(), I just only want that when the user Logged in correctly the login UI will be hidden and the content UI will display... so I was thinking that the ui can be hide or the visibility will be hidden? for example I had this code...
def httpGETCheck(username, password):
....
# assumed that the user is correct
if registeredUser:
# how can I hide or set visible is false to all the UI in the showLogin() Module
# and how can I show the showContent() UI or replaced the showContent() UI from showLogin() UI
class ContentUI():
def showContent(self, frame):
button1 = Button(frame, text="+", width=15, command=counterPlus)
button1.grid()
def showLogin(self, frame):
self.contentUI = ContentUI()
L1 = Label(frame, text="User Name")
L1.pack( side = LEFT)
L1.grid()
E1 = Entry(frame, bd =5)
E1.pack(side = RIGHT)
E1.grid()
L2 = Label(frame, text="Password")
L2.pack( side = LEFT)
L2.grid()
E2 = Entry(frame, bd =5, show="*")
E2.pack(side = RIGHT)
E2.grid()
submit = Button(frame, text="Login", width=15, command=lambda: httpGETCheck(E1.get(), E2.get()))
submit.grid()
class UIDisplay():
def play(self):
root = Tk()
root.title(title)
root.geometry(dimension)
app = Frame(root)
contentUI = ContentUI()
contentUI.showLogin(app)
app.grid()
root.mainloop()
ad = UIDisplay()
ad.play()