Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # import the GUI widgets taht 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 eventws go here
- def btn_go_clicked():
- if txt_pw1.value==txt_pw2.value:
- info( "Password validate", txt_name.value + " passwords match " )
- else:
- info("Password validate", txt_name.value + " passwords no match " )
- # Your GUI widgets go here
- lbl_name = Text(app,text="Hello. What's your name?")
- txt_name = TextBox(app)
- lbl_pw1 = Text(app,text="enter a password:")
- txt_pw1 = TextBox(app)
- lbl_pw2 = Text(app,text="repeat a password:")
- txt_pw2 = TextBox(app)
- btn_go = PushButton(app, command=btn_go_clicked, text="Done")
- #Show the GUI on the screen
- app.display()# Escribe tu código aquí :-)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement