Advertisement
Mori007

myfirstgui_error

Feb 1st, 2021
1,060
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. from guizero import App, TextBox, Text, PushButton, info
  2.  
  3. app = App()
  4.  
  5. # Function GUI
  6. def btn_click1():
  7.     info("Greeting..", "Your name is, " + txt_name.value + "and ", " Youlike, " + txt_animal.value + " Nice ")
  8.  
  9.  
  10. #def btn_click2():
  11.  
  12. lbl_name = Text(app, text="Howdy.. What's your name?")
  13. txt_name = TextBox(app)
  14. lbl_animal = Text(app, text="What's animal do you like?")
  15. txt_animal = TextBox(app)
  16. btn_go = PushButton(app, command=btn_click1, text="Done")
  17.  
  18. app.display()
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement