Я пытаюсь изменить текст на нижнем уровне, когда я нажимаю кнопку, но она не меняется, у меня есть этот код:
Контроллер:
class Controller(BoxLayout):
random_string = StringProperty()
random_string="hola"
def do_action(self):
random_string="h22l"
print(random_string)
def do_action2(self):
random_string="hl2332323"
print(str(random_string))
my .mk:
<Controller>:
label: lvId
BoxLayout:
orientation: 'vertical'
Button:
text: 'Click Me'
on_press: root.do_action()
Button:
text: 'Click Me'
on_press: root.do_action2()
Label:
id: lvId
text: root.random_string
text_size: root.width, None
size: self.texture_size