Advertisement
jolgri

Assignment3

Dec 9th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # Import the GUI widgets
  2. from guizero import App, TextBox, PushButton, Text, info
  3. app = App()
  4.  
  5. # Function definitions for your events go here.
  6. def btn_go_clicked():
  7. if txt_psw.value == txt_psw2.value :
  8. msg = "Passwords match"
  9. else :
  10. msg = "The passwords do not match"
  11. info("Password check", msg)
  12.  
  13. # Your GUI widgets go here
  14. lbl_psw = Text(app, text="Password")
  15. txt_psw = TextBox(app)
  16. lbl_psw2 = Text(app, text="Re-enter password")
  17. txt_psw2 = TextBox(app)
  18. btn_go = PushButton(app, command=btn_go_clicked, text="Submit")
  19.  
  20. # Show the GUI on the screen
  21. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement