Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import the GUI widgets that you'll be using, and create the 'app' for your program.
- from guizero import App, Box, Text, PushButton, TextBox, info, ButtonGroup, CheckBox
- app = App(title="Boxes",width="600",height="400",bg="white")
- # Function definitions for your events go here.
- def btn_go_clicked():
- name = f"{bg_adjective1.value} {txt_colour.value} {bg_adjective2.value} {cbo_animal.value}"
- lbl_hero.value = name
- # Your GUI widgets go here
- boxLeft = Box(app, align="left", width=100, height='fill', border=1)
- boxTop = Box(app, align="top", width='fill', height=50, border=1)
- boxBottom = Box(app, align="top", width='fill', height='fill', border=1)
- btn_open = PushButton(boxLeft,align="top", text="Open", width="fill")
- btn_save = PushButton(boxLeft, align="top", text="Save", width="fill")
- btn_print = PushButton(boxLeft, align="top", text="Print", width="fill")
- lblTitle = Text(boxTop, text = 'Using Boxes',color = 'red', size = 18, width = 'fill')
- txtCode = TextBox(boxBottom, width = 'fill', height = 'fill', multiline = True, scrollbar = True)
- txtCode.bg = 'light yellow'
- # Show the GUI on the screen
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement