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_check_clicked():
- if txt_pass.value != txt_pass1.value:
- info("Message","Passwords don't match!")
- else:
- info("Message","Well done")
- # Your GUI widgets go here
- lbl_pass = Text(app, text="Please enter a password: ")
- txt_pass = TextBox(app)
- lbl_pass1 = Text(app, text="Reenter password: ")
- txt_pass1 = TextBox(app)
- btn_check = PushButton(app, command=btn_check_clicked, text="Check")
- # Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement