Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import App, TextBox, PushButton, Text, info
- app = App()
- # Function definitions for your events go here
- def btn_go_clicked():
- info("Greetings", "Hello, " + txt_name.value + " Your favourite animal is " + txt2_name.value)
- def btn_iceCream_clicked():
- info("ice_cream", "so " + txt_name.value + "Does your " + txt2_name.value + "eat Ice-cream")
- # Your GUI widgets go here
- lbl_name = Text(app, text="Hello. What's your name?")
- txt_name = TextBox(app)
- lbl2_name = Text(app, text=" What is you favourite animal?")
- txt2_name = TextBox(app)
- btn_go = PushButton(app, command=btn_go_clicked, text="Done")
- btn_iceCream = PushButton(app, command=btn_iceCream_clicked, text="Submit")
- # Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement