Guest User

Untitled

a guest
Jul 10th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. class HomeScreen(Screen):
  2.  
  3. def show_tasks(self):
  4. global user
  5.  
  6. tasks = DB.get_tasks(user) # Returns an array of tuples
  7. for task in tasks:
  8. self.add_widget(Label(text=task[1]))
  9.  
  10. <HomeScreen>:
  11. name: 'home'
  12. FloatLayout:
  13. BoxLayout:
  14. orientation: "horizontal"
  15. pos_hint: {"x": 0, "y": 0}
  16. GridLayout:
  17. id: grid
  18. rows: 4
  19. cols: 1
  20. padding: 10
  21. spacing: 10
  22. row_force_default: True
  23. row_default_height: 40
  24. Label:
  25. text: 'Your Tasks:'
  26. size_hint_x: None
  27. width: 200
  28. font_size: 24
Add Comment
Please, Sign In to add comment