Advertisement
Vesna_To

GUI3

Aug 3rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  2. from guizero import App, TextBox, PushButton, Text, info
  3. app = App()
  4.  
  5. # Function definitions for your events go here.
  6. def btn_check_clicked():
  7. if txt_pass.value != txt_pass1.value:
  8. info("Message","Passwords don't match!")
  9. else:
  10. info("Message","Well done")
  11. # Your GUI widgets go here
  12. lbl_pass = Text(app, text="Please enter a password: ")
  13. txt_pass = TextBox(app)
  14. lbl_pass1 = Text(app, text="Reenter password: ")
  15. txt_pass1 = TextBox(app)
  16. btn_check = PushButton(app, command=btn_check_clicked, text="Check")
  17. # Show the GUI on the screen
  18. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement