-1
I cannot change the name of Label 1 or Label 2 through the click function. The program shows only "hi" on the console.
Python code:
import kivy
kivy.require("1.9.1")
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class MinhaTela(BoxLayout):
def click(self):
print("oi")
self.ids.lb1.text: ""
self.ids.lb2.text: "10"
class Estudo(App):
pass
e1 = Estudo()
e1.run()
Kivy code:
<MinhaTela@BoxLayout>
orientation: "vertical"
Button:
text: "OK"
on_press: root.click()
Label:
text: "Label 1"
id: lb1
Label:
text: "Label 2"
id: lb2
MinhaTela: