Skip to content

Instantly share code, notes, and snippets.

@kived
Last active August 29, 2015 14:13
Show Gist options
  • Save kived/8618603c9490eaa98cfc to your computer and use it in GitHub Desktop.
Save kived/8618603c9490eaa98cfc to your computer and use it in GitHub Desktop.
Kivy: separation of UI and App
from kivy.app import App
from kivy.properties import StringProperty
class TestApp(App):
appabc = StringProperty('')
def build(self):
self.bind(appabc=self.root.setter('abc'))
self.appabc = 'hello'
if __name__ == '__main__':
TestApp().run()
BoxLayout:
abc: ''
Label:
text: root.abc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment