Skip to content

Instantly share code, notes, and snippets.

@inclement
Created January 5, 2014 13:12
Show Gist options
  • Select an option

  • Save inclement/8268019 to your computer and use it in GitHub Desktop.

Select an option

Save inclement/8268019 to your computer and use it in GitHub Desktop.
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