JAWarr

little boxes

Aug 18th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. # Create an app that contains three boxes of different sizes. J.Warr 18/08/2020
  2.  
  3. from guizero import *
  4. app = App()
  5. box1 = Box(app, align="top", width=150, height=50, border=2)
  6. box1.bg="green"
  7. box2 = Box(app, align="top", width=100, height=100, border=4)
  8. box2.bg="orange"
  9. box3 = Box(app, align="top", width=250, height=150, border=6)
  10. box3.bg="red"
  11. box3.text_size=18
  12.  
  13. message1 = Text(box1, text="Button Box")
  14. button = PushButton(box2, text="Button")
  15. textbox1 = TextBox(box3, text="Text Box", hide_text=True)
  16. textbox2 = TextBox(box3, text="Text Box")
  17. textbox3 = TextBox(box3, text="Text Box")
  18.  
  19. app.display()
  20.  
Advertisement
Add Comment
Please, Sign In to add comment