Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from kivy.uix.boxlayout import BoxLayout
- from kivy.app import App
- from kivy.lang import Builder
- Builder.load_string('''
- <Demo>:
- orientation: 'vertical'
- BoxLayout:
- orientation: 'horizontal'
- height: self.minimum_height
- size_hint_y: None
- Button:
- size_hint_y: None
- height: 100
- pos_hint: {'center_y': 0.5}
- text: '1'
- y: 50
- Button:
- size_hint_y: None
- height: 200
- text: '2'
- Button:
- size_hint_y: None
- pos_hint: {'top': 1}
- height: 300
- text: '3'
- Button:
- size_hint_y: None
- height: 400
- text: '4'
- Button:
- text: 'Remaining space'
- ''')
- class Demo(BoxLayout):
- pass
- class DemoApp(App):
- def build(self):
- return Demo()
- if __name__ == '__main__':
- DemoApp().run()
Advertisement
Add Comment
Please, Sign In to add comment