August 2015
Intermediate to advanced
246 pages
4h 21m
English
This recipe will teach you how to access definitions inside the Kv language in your Python code and vice versa.
This recipe will use button, a very common widget that we also used in the last recipe.
This recipe follows as:
<MyW>:
Button:
id: b1
text: 'Press to smash'
on_release: root.b_smash()import kivy kivy.require('1.8.0') # replace with your current kivy version ! from kivy.app import App from kivy.uix.widget import Widget class MyW(Widget): def b_smash(self): self.ids.b1.text ...Read now
Unlock full access