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():
- info("Greetings","Your name is " + txt_name.value + " And you like " +txt_ani.value )
- def btn_ot_clicked():
- info("Greetings","Good Bye " + txt_name.value + " And you " +txt_ani.value )
- # Your GUI widgets go here
- lbl_name = Text(app,text="Hello. What's your name?")
- txt_name = TextBox(app)
- lbl_ani = Text(app,text="the name of an animal?")
- txt_ani = TextBox(app)
- btn_go = PushButton(app, command=btn_go_clicked, text="Done")
- btn_ot = PushButton(app, command=btn_ot_clicked, text="Done")
- #Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement