嗨,我正在使用Tkinter()在python中开发一个单独的登录,我只希望当用户正确登录时,登录界面将被隐藏并且内容UI将显示。。。所以我在想ui可以隐藏还是可见性隐藏?
例如我有这个代码。。。在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(fram