Created
January 5, 2014 13:12
-
-
Save inclement/8268019 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.boxlayout import BoxLayout | |
| from kivy.lang import Builder | |
| from kivy.properties import StringProperty | |
| Builder.load_string(''' | |
| <Simple>: | |
| Label: | |
| #text: 'Hello World' # THIS IS WORKING | |
| text: root.sometext | |
| ''') | |
| class Simple(BoxLayout): | |
| sometext = StringProperty('') | |
| def __init__(self, **kwargs): | |
| super(Simple, self).__init__(**kwargs) | |
| self.sometext = 'Hello from Init.' | |
| class TApp(App): | |
| def build(self): | |
| return Simple() | |
| TApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment