maroph

threeboxes.py

Dec 7th, 2019
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | None | 0 0
  1. from guizero import App, Box, ButtonGroup, PushButton, Text
  2.  
  3. app = App(title='Three Boxes', bg='silver', height=620, width=320)
  4. box1 = Box(app, border=1, height=100, width=100)
  5. box1.bg = 'red'
  6. box2 = Box(app, border=2, height=200, width=200)
  7. box2.bg = 'yellow'
  8. box3 = Box(app, border=3, height=300, width=300)
  9. box3.bg = 'green'
  10.  
  11. button1 = PushButton(box1, text="Button #1")
  12. button1.bg = 'white'
  13.  
  14. button2 = PushButton(box2, text="Button #2")
  15. button2.bg = 'white'
  16.  
  17. button3 = PushButton(box3, text="Button #3")
  18. button3.bg = 'white'
  19. lbl_choice = Text(box3, text='What does this look like?')
  20. choice = ButtonGroup(box3, options=["fantastic", "boring", "mmmhhhh"], horizontal=True)
  21.  
  22. app.display()
Advertisement
Add Comment
Please, Sign In to add comment