Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import toga
- class StartApp(toga.App):
- def startup(self):
- self.main_window = toga.MainWindow(self.name)
- self.main_window.app = self
- box1 = toga.Box(children=[toga.Label('test')])
- box2 = toga.Box(children=[toga.Label('split_container')])
- split_container = toga.SplitContainer()
- split_container.content = [box1, box2]
- label_stub = toga.Label('Whut')
- footer = toga.Box()
- footer.add(label_stub)
- outer_split_container = toga.SplitContainer(direction=toga.SplitContainer.HORIZONTAL)
- outer_split_container.content = [split_container, footer]
- self.main_window.content = outer_split_container
- self.main_window.show()
- def main():
- app = StartApp('SplitContainer Test', 'org.pybee.test')
- app.main_loop()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement