Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import the GUI widgets thay you'll be using, and create the 'app' for
- # your program.
- from guizero import App, TextBox, PushButton, Text, info
- app = App()
- # Function definition for your events go here.
- def btn_go_clicked():
- info("Greetings", "The passwords " + \
- ("are empty!" \
- if len(txt_pwd1.value) == len(txt_pwd2.value) == 0 \
- else ("" if txt_pwd1.value == txt_pwd2.value else "don't ") + \
- "match"))
- # Your GUI widgets go here
- lbl_pwd1 = Text(app, text = "Enter your password twice")
- txt_pwd1 = TextBox(app)
- txt_pwd2 = TextBox(app)
- btn_go = PushButton(app, command = btn_go_clicked, text = "Done")
- # Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement