Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import App, Text, TextBox, PushButton, info
- app = App(title='Login')
- # Function of comparing the password
- def compared_pass():
- if txt_pass1.value == txt_pass2.value:
- info("Password", "Your password is right " + txt_user.value + " OK...")
- else:
- info("Password", "Please check again... Password is wrong.. ")
- # GUI Widget
- lb_user = Text(app, text='Enter username')
- txt_user = TextBox(app)
- lb_pass1 = Text(app, text='Enter your password')
- txt_pass1 = TextBox(app)
- lb_pass2 = Text(app, text='Please enter your password again')
- txt_pass2 = TextBox(app)
- btn_compared = PushButton(app, command=compared_pass, text='Compared')
- # Display on screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement