1
我有一个问题,我有这样的代码:Kivy没有得到button.text值正确
for j in range(1,21):
if "Canales" in item.title:
self.btn = Button(text="Channel "+str(j), size=(590, 42),size_hint=(None, None), on_press=self.aces)
layout.add_widget(self.btn)
...
def aces(self, valor):
print self.btn.text
当我打印self.btn.text我没有得到按钮上的文字,我总是得到j的最后一个值,“channel 20”...是一个Bug?只是我的无能?...
在此先感谢