While not directly answering your question.
You code will be easier to manage, and I’m willing to be it will fix your problem is you use kivy properties in your screen to update the labels.
Here is a very small example.
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen
from kivy.properties import StringProperty
kv = """
<LabelScreen>:
Label:
text: root.text # this refers the the kivy StringProperty
BoxLayout:
size_hint_y: None
height: dp(48)
Button:
text: 'Hello'
on_release: root.change_text('You selected the Hello Button')
Button:
text: 'Something different...'
on_release: root.somthing_else()
Button:
text: 'Goodbye'
on_release: root.change_text('You selected the Goodbye Button')
Button:
text: 'Change from kv'
on_release: root.text = 'Changed from kv'
ScreenManager:
LabelScreen:
"""
class LabelScreen(Screen):
text = StringProperty('Initial Value')
def change_text(self, message):
self.text = message
def somthing_else(self):
self.text = 'Somthing Else...'
class PropertyDemo(App):
def build(self):
return Builder.load_string(kv)
PropertyDemo().run()
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/6f8b6a4b-8854-4b13-bc90-0422c5e5b26fn%40googlegroups.com.