Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import App, Text, Box
- # this time we have not set the layout to auto as it is default
- app = App(title="align")
- # create a series of widgets each with a different alignment
- top_text = Text(app, text="at the top", align="top")
- bottom_text = Text(app, text="at the bottom", align="bottom")
- left_text = Text(app, text="to the left", align="left")
- left_text_1 = Text(app, text="to the left again", align="left")
- right_text = Text(app, text="to the right", align="right")
- box = Box(app, width="fill", height="fill", border=1)
- box.bg = "orange"
- box_text_top = Text(box, text="box top", align="top")
- box_text_left = Text(box, text="box left", align="left")
- box_text_right = Text(box, text="box right", align="right")
- box_text_right_1 = Text(box, text="box right again", align="right")
- box_text_bottom = Text(box, text="box bottom", align="bottom")
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement