【发布时间】:2016-08-26 02:44:01
【问题描述】:
我有问题,我有这个代码:
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”......是错误吗?只是我无能吗?...
提前致谢
【问题讨论】: