SHARE
TWEET

GUIs 2.6

john_feleppa Aug 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from guizero import App, Text, Box
  2.  
  3. # this time we have not set the layout to auto as it is default
  4. app = App(title="align")
  5.  
  6. # create a series of widgets each with a different alignment
  7. top_text = Text(app, text="at the top", align="top")
  8. bottom_text = Text(app, text="at the bottom", align="bottom")
  9. left_text = Text(app, text="to the left", align="left")
  10. left_text_1 = Text(app, text="to the left again", align="left")
  11. right_text = Text(app, text="to the right", align="right")
  12.  
  13. box = Box(app, width="fill", height="fill", border=1)
  14. box.bg = "orange"
  15. box_text_top = Text(box, text="box top", align="top")
  16. box_text_left = Text(box, text="box left", align="left")
  17. box_text_right = Text(box, text="box right", align="right")
  18. box_text_right_1 = Text(box, text="box right again", align="right")
  19. box_text_bottom = Text(box, text="box bottom", align="bottom")
  20.  
  21. app.display()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top