Advertisement
zhongnaomi

info gui 8

Sep 10th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  2. from guizero import App, TextBox, PushButton, Text, info
  3. app = App()
  4.  
  5. # Function definitions for your events go here.
  6. def btn_go_clicked():
  7.     info("Greetings","Your name is " + nametxt_name.value + " ,and you like " + animal_name.value )
  8.  
  9. # Your GUI widgets go here
  10. lbl_name = Text(app, text="Hello. What's your name?")
  11. nametxt_name = TextBox(app)
  12. Questionanilmal= Text(app, text="Which animal do you like?")
  13. animal_name = TextBox(app)
  14. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  15.  
  16. # Show the GUI on the screen
  17. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement