Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Mon Jun 29 14:13:29 2015
  4.  
  5. @author: robert
  6. """
  7. import kivy
  8.  
  9. from kivy.app import App
  10. from kivy.lang import Builder
  11.  
  12. root = Builder.load_string('''
  13. AnchorLayout:
  14. anchor_x: 'left'
  15. StackLayout:
  16. orientation: 'lr-tb'
  17. size_hint: None, None
  18. height: self.minimum_height
  19. width: 1
  20.  
  21. Label:
  22. size_hint: None, None
  23. width: self.texture_size[0] + dp(12)
  24. height: self.texture_size[1] + dp(12)
  25. text: 'Hello, this is a long message here'
  26.  
  27. Label:
  28. size_hint: None, None
  29. width: self.texture_size[0] + dp(12)
  30. height: self.texture_size[1] + dp(12)
  31. text: 'Hello world'
  32.  
  33. Widget:
  34. size_hint_y: None
  35. height: dp(12)
  36.  
  37. Label:
  38. size_hint: None, None
  39. width: self.texture_size[0] + dp(12)
  40. height: self.texture_size[1] + dp(12)
  41. text: 'Bye'
  42. ''')
  43.  
  44. class TestApp(App):
  45. def build(self):
  46. return root
  47.  
  48. if __name__ == '__main__':
  49. TestApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement