crzcas

eventgui-pwd

Feb 27th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 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_go_clicked():
  7.     if (txt_name.value) == (txt2_name.value):
  8.         info("Match", "You can enter the site")
  9.     else:
  10.         info("Not match", "You cannot enter the site")
  11.  
  12. # Your GUI widgets go here
  13. lbl_name = Text(app, text="Type your password")
  14. txt_name = TextBox(app)
  15. lbl2_name = Text(app, text="Type your password again")
  16. txt2_name = TextBox(app)
  17.  
  18. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  19.  
  20. # Show the GUI on the screen
  21. app.display()
Add Comment
Please, Sign In to add comment