JAWarr

Fast Food App with grid layout

May 6th, 2022
833
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.11 KB | None | 0 0
  1. # 06/05/2022 fast food app with grid layout
  2. from guizero import App, Box, Text, TextBox, PushButton
  3.  
  4. app = App(layout="grid", bg="orange")
  5.  
  6. lbl_fname = Text(app, text="First name", grid=[0,0])
  7. txt_fname = TextBox(app, grid=[1,0])
  8.  
  9. lbl_sname = Text(app, text="Surname", grid=[0,1])
  10. txt_sname = TextBox(app, grid=[1,1])
  11.  
  12. lbl_dob = Text(app, text="Postcode", grid=[0,2])
  13. txt_dob = TextBox(app, grid=[1,2])
  14.  
  15. button1 = PushButton(app, text="small fries", grid=[3,4], width="10")
  16. button2 = PushButton(app, text="medium fries", grid=[4,4], width="10")
  17. button3 = PushButton(app, text="large fries", grid=[5,4], width="10")
  18. button4 = PushButton(app, text="burger", grid=[3,5], width="10")
  19. button5 = PushButton(app, text="cheese burger", grid=[4,5], width="10")
  20. button6 = PushButton(app, text="whopper", grid=[5,5], width="10")
  21. button7 = PushButton(app, text="small drink", grid=[3,6], width="10")
  22. button8 = PushButton(app, text="regular drink", grid=[4,6], width="10")
  23. button9 = PushButton(app, text="supersize drink", grid=[5,6], width="10")
  24. button0 = PushButton(app, text="dessert", grid=[4,7], width="10")
  25.  
  26. app.display()
  27.  
Advertisement
Add Comment
Please, Sign In to add comment