kingshuk2018

Untitled

Nov 19th, 2020
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. from guizero import App, TextBox, PushButton, Text, info
  2. app = App()
  3.  
  4. def btn_go_clicked():
  5. info("Greetings","Hello, Your Name is " + txt_name.value + " and you like "+ txt_animal.value )
  6.  
  7. lbl_name = Text(app, text="Hello. What's your name?")
  8. txt_name = TextBox(app)
  9. lbl_animal = Text(app, text="Which animal do you like best?")
  10. txt_animal = TextBox(app)
  11. btn_go = PushButton(app, command=btn_go_clicked, text="Show the message")
  12.  
  13. app.display()
Add Comment
Please, Sign In to add comment