Advertisement
mrFitzpatrick

boxStylingWithGuiZero

Aug 6th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. from guizero import Box, App, PushButton, TextBox, Text
  2.  
  3.  
  4.  
  5. app = App(height=450, width=300)
  6.  
  7. box_header = Box(app, align="top", border=1, width="fill", height=100)
  8. box_header.bg = "dark blue"
  9.  
  10. box_body = Box(app, align="top", border=0, width="fill", height=300)
  11. box_body.bg = "blue"
  12.  
  13.  
  14. box_footer = Box(app, align="bottom", border=0, width="fill", height=50)
  15. box_footer.bg = "light blue"
  16.  
  17. lbl_header = Text(box_header, "HEADER")
  18. lbl_header.text_color = "white"
  19. lbl_header.text_size = 24
  20.  
  21. lbl_body = Text(box_body, "This is starting to")
  22. lbl_body2 = Text(box_body, "feel a lot like")
  23. lbl_body3 = Text(box_body, "styling with CSS!")
  24.  
  25. lbl_body.text_color = "#ffffff"
  26. lbl_body.text_size = 18
  27. lbl_body2.text_color = "#ffffff"
  28. lbl_body2.text_size = 18
  29. lbl_body3.text_color = "#ffffff"
  30. lbl_body3.text_size = 18
  31.  
  32.  
  33. lbl_footer = Text(box_footer, "FOOTER")
  34. lbl_footer.text_color = "black"
  35. lbl_footer.text_size = 14
  36.  
  37. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement