kivy.require('1.9.0')
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class AppLayout(BoxLayout):
def process_button(self):
self.labl.text = 'hello'
class AttemptApp(App):
def build(self):
return AppLayout()
def SomeFunction():
#How do I (or can I) reference the labl widget in this function?:
#print (labl.text)
myApp = AttemptApp()
myApp.run()
kv file:
<AppLayout>:
id: attempt
labl: labl
BoxLayout:
Label:
id: labl
font_size: 40
Button:
text: 'print hello'
on_press: attempt.process_button()
font_size: 40
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.