maroph

firstgui.py

Dec 5th, 2019
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. # from guizero import App, Text, Picture
  2. from guizero import App, Text
  3.  
  4. app = App(title="This is my first GUI", width=860)
  5.  
  6. first_message = Text(app, text="GUIs are cool.")
  7. first_message.text_size = 40
  8.  
  9. second_message = Text(app, text="this is a green message text.")
  10. second_message.bg = "green"
  11.  
  12. third_message = Text(app, text="***** DON'T PANIC *****")
  13. # third_message.font = 'Arial'
  14. third_message.font = 'Comic Sans MS'
  15. third_message.text_size = 50
  16. third_message.text_color = "red"
  17. third_message.bg = "white"
  18. third_message.width = 'fill'
  19.  
  20. # seems that pictures can only be loaded from a local accessible file system
  21. # pic = Picture(app, image='dntpanic.gif')
  22. # pic.width = '400'
  23. # pic.height = '400'
  24.  
  25. app.display()
Advertisement
Add Comment
Please, Sign In to add comment