Advertisement
kalpin

bixes1

Aug 4th, 2020 (edited)
1,213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.16 KB | None | 0 0
  1. # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  2. from guizero import App, Box, Text, PushButton, TextBox, info, ButtonGroup, CheckBox
  3.  
  4. app = App(title="Boxes",width="600",height="400",bg="white")
  5.  
  6.  
  7. # Function definitions for your events go here.
  8. def btn_go_clicked():
  9.     name = f"{bg_adjective1.value} {txt_colour.value} {bg_adjective2.value} {cbo_animal.value}"
  10.     lbl_hero.value = name
  11.    
  12.  
  13. # Your GUI widgets go here
  14.  
  15. boxLeft     = Box(app, align="left", width=100, height='fill', border=1)
  16. boxTop      = Box(app, align="top", width='fill', height=50, border=1)
  17. boxBottom   = Box(app, align="top", width='fill', height='fill', border=1)
  18.  
  19. btn_open = PushButton(boxLeft,align="top", text="Open", width="fill")
  20. btn_save = PushButton(boxLeft, align="top", text="Save", width="fill")
  21. btn_print = PushButton(boxLeft, align="top", text="Print", width="fill")
  22.  
  23. lblTitle = Text(boxTop, text = 'Using Boxes',color = 'red', size = 18, width = 'fill')
  24.  
  25. txtCode = TextBox(boxBottom, width = 'fill', height = 'fill', multiline = True, scrollbar = True)
  26. txtCode.bg = 'light yellow'
  27.  
  28. # Show the GUI on the screen
  29. app.display()
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement