Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1.  
  2. # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  3. from guizero import App, TextBox, PushButton, Text, info
  4. app = App()
  5.  
  6. # Function definitions for your events go here.
  7. def btn_go_clicked():
  8. if txt_password1.value == txt_password2.value:
  9. info("Match","The passwords match")
  10. else:
  11. info("No match", "The passwords don't match, please enter them again.")
  12.  
  13.  
  14.  
  15.  
  16. # Your GUI widgets go here
  17. lbl_password1 = Text(app, text="Please enter your new password.")
  18. txt_password1 = TextBox(app)
  19. lbl_password2 = Text(app, text="Please enter your password again")
  20. txt_password2 = TextBox(app)
  21. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  22.  
  23.  
  24. # Show the GUI on the screen
  25. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement