Advertisement
Mori007

myassigment01

Feb 1st, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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 You like " + txt_animal.value + " Nice ")
  8.  
  9.  
  10. def btn_click2():
  11. info("Prank", "Anda ingin hewan " + txt_animal.value + " Please call the animal shelter..Duudd..")
  12.  
  13. lbl_name = Text(app, text="Howdy.. What's your name?")
  14. txt_name = TextBox(app)
  15. lbl_animal = Text(app, text="What's animal do you like?")
  16. txt_animal = TextBox(app)
  17. btn_go = PushButton(app, command=btn_click1, text="Done")
  18. btn_prank = PushButton(app, command=btn_click2, text="What's Up")
  19.  
  20. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement