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)