Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import toga
  2.  
  3. class StartApp(toga.App):
  4. def startup(self):
  5. self.main_window = toga.MainWindow(self.name)
  6. self.main_window.app = self
  7.  
  8. box1 = toga.Box(children=[toga.Label('test')])
  9. box2 = toga.Box(children=[toga.Label('split_container')])
  10.  
  11. split_container = toga.SplitContainer()
  12. split_container.content = [box1, box2]
  13.  
  14. label_stub = toga.Label('Whut')
  15. footer = toga.Box()
  16. footer.add(label_stub)
  17.  
  18. outer_split_container = toga.SplitContainer(direction=toga.SplitContainer.HORIZONTAL)
  19. outer_split_container.content = [split_container, footer]
  20.  
  21. self.main_window.content = outer_split_container
  22. self.main_window.show()
  23.  
  24. def main():
  25. app = StartApp('SplitContainer Test', 'org.pybee.test')
  26. app.main_loop()
  27.  
  28. if __name__ == '__main__':
  29. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement