Advertisement
JDpaste

Python GUI guizero basic demo: firstgui.py

Sep 23rd, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. # This Python code is a basic demo of the GUI guizero
  2. # guizero works with tkinter but simpler with extra widgets eg. Slider
  3. # https://lawsie.github.io/guizero/slider/
  4. # firstgui.py
  5. from guizero import App, Text
  6. app = App( title="Hi there", bg = "#FFFF00", width = 700 )
  7. #---------------
  8. # create widgets .. specify some starting parameters
  9. firstmessage  = Text(app, text="This is big text", color='red')
  10. secondmessage = Text(app, text="This is green")
  11. message3 = Text(app, text="This is message3 in font Times New Roman", font="Times New Roman")
  12. #-----------------------
  13. # adjust widget settings - using properties
  14. firstmessage.text_size = 40
  15. secondmessage.bg = "green"
  16.  
  17. message3.text_size = 24
  18. message3.text_color = "cyan"
  19. message3.bg = 'magenta'
  20. #----------
  21. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement