Advertisement
bill_z

Untitled

Aug 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #Practicing using Boxes
  2. from guizero import App, Box, PushButton, Picture
  3. app = App( width = 450, height= 650)
  4. Pic1 = "/home/pi/Pictures/ThankYou.gif"
  5. Pic2 = "/home/pi/Pictures/Tardis1.gif"
  6. Pic3 = "/home/pi/Pictures/WeepingAngle.gif"
  7.  
  8. Picture(app, image=Pic1, height=50, width=50)
  9. box1 = Box(app, align="Top", border=1, width = 250, height= 140)
  10. button1 = PushButton(box1, text="Box1: a button", height=1, width=15)
  11. button2 = PushButton(box1, text="Box1:another button", height=1, width=15)
  12. button3 = PushButton(box1, text="Box1:yet another button", height=1, width=25)
  13.  
  14. Picture(app, image=Pic2, height=50, width=50)
  15. box2 = Box(app, align="Top", border=2, width = 350, height= 160)
  16. button1 = PushButton(box2, text="Box2: a button", height=1, width=20)
  17. button2 = PushButton(box2, text="Box2: another button", height=1, width=20)
  18. button3 = PushButton(box2, text="Box2: yet another button", height=1, width=25)
  19.  
  20. Picture(app, image=Pic3, height=50, width=50)
  21. box3 = Box(app, align="Top", width="fill", border=3)
  22. button1 = PushButton(box3, text="Box3: a button", height=1, width=25)
  23. button2 = PushButton(box3, text="Box3: another button", height=1, width=25)
  24. button3 = PushButton(box3, text="Box3: yet another button", height=1, width=25)
  25.  
  26. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement