Advertisement
zhongnaomi

info color gui

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