from guizero import App, TextBox, PushButton, Text, info
app = App()
def btn_go_clicked():
info("Greetings","Hello, " + txt_name.value + " - are you really " + txt_age.value + " years old?\n" +
"You seem to live in " + txt_location.value)
def btn_go_clicked_deny():
info("*****Deny*****", "I don't believe your name is " + txt_name.value)
lbl_name = Text(app, text="Hello. What's your name?")
txt_name = TextBox(app)
lbl_age = Text(app, text="What's your age?")
txt_age = TextBox(app)
lbl_location = Text(app, text="Where do you live?")
txt_location = TextBox(app)
btn_go = PushButton(app, command=btn_go_clicked, text="Done")
btn_go = PushButton(app, command=btn_go_clicked_deny, text="Deny")
app.display()
Comments