0
带有无法在我手中修复的错误。我找到一个已定义的变量,它已被打开我希望页面关闭,所以不是所有的窗口都打开,但是当我加载新的用户屏幕后,他们已经完成填充新的用户细节,我把一个按钮,它将重定向它们到existingUserEntry页面,它说它不能调用该按钮,需要任何帮助,谢谢?无法调用“按钮”命令:应用程序已被销毁
def existingUserEntry():
intitialScreen.destroy()
login = False
global existingUserScreen, usernameEntry, passwordEntry
existingUserScreen = Tk() # Set up a screen
existingUserScreen.title("Existing User Login Screen")# Set a caption
existingUserScreen.config(bg = "WHITE")# Set the background colour
existingUserScreen.geometry("350x150")# Set the size of the window
# Code for the username entry box.
usernameLabel = Label(existingUserScreen, text = "User name:")# Username Text box
usernameLabel.config(bg = "PALE GREEN", font=('Helvetica', 12))# Formatting Features
usernameLabel.pack()
usernameEntry = ttk.Entry(existingUserScreen, font = "bold", width = 30)
usernameEntry.pack()
# Code for the password entry box.
passwordLabel = Label(existingUserScreen, text = "Password:")# Password Text box
passwordLabel.config(bg = "PALE GREEN", font=('Helvetica', 12))# Formatting Features
passwordLabel.pack()
passwordEntry = ttk.Entry(existingUserScreen, font = "bold", width = 30, show="*")
passwordEntry.pack()
# Code for the sign in button.
signInButton = Button(existingUserScreen, text="Sign in", width=10, command=verifyLoginDetails)
signInButton.pack(expand = 1)# Placement of the Sign In button
existingUserScreen.mainloop()
#Code for a button to allow new users to login to profile after creating one
newUserSignInButton = Button(newUserScreen, text=" Back to Login Screen", width=15, command=backToLoginScreen)
newUserSignInButton.config(height= 1, width= 40)
newUserSignInButton.pack(expand= 4)
newUserScreen.mainloop()
newUserScreen = Button(intitialScreen, text="Existing User Sign In", width=25, command=existingUserEntry)