0
내 손으로 수정할 수없는 오류가 있습니다. 내가 정의 된 변수를 찾은 후에 페이지가 닫히기를 원합니다. 모든 창이 열리지는 않습니다. 그러나 새 사용자 화면에 새로운 사용자 정보를 입력하면로드합니다. 버튼을 넣으면 리디렉션됩니다. 버튼을 호출 할 수 없다는 기존의 UserEntry 페이지로 어떤 도움이 필요합니까?"button"명령을 호출 할 수 없습니다. 응용 프로그램이 손상되었습니다.
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)