Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # # Import the GUI widgets that you'll be using, and create the 'app' for your program.
- from guizero import App, TextBox, PushButton, Text, info
- app = App()
- # Function definitions for your events go here.
- def btn_go_clicked():
- if txt_pw1.value == txt_pw2.value :
- info("Password Check","Good news passwords match")
- else:
- info("Password Check","nope passwords don't match")
- # Your GUI widgets go here
- lbl_pw1 = Text(app, text="Hello. Please enter your password")
- txt_pw1 = TextBox(app)
- lbl_pw2 = Text(app, text="Re- enter password here")
- txt_pw2 = TextBox(app)
- btn_go = PushButton(app, command=btn_go_clicked, text="Check Password")
- # Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement