0
Baically我创建了一个简单的数学游戏增加,并使其显示的问题是对还是错,但我不能让比分更新,也没有人知道我怎样才能得到这些问题刷新到另外一个问题,我想app.update:有谁知道如何有一个分数通过标签
self.a1button = Tkinter.Button(self, background="blue",foreground="white", text = (random_row.A1), command = self.QUESTION1)
self.a1button.grid(row = 9, column = 1, sticky = 'W')
self.label5 = Tkinter.Label(self, text = "Score:")
self.label5.grid(row = 14, column = 1, columnspan = 5, sticky = 'S')
self.label7 = Tkinter.Label(self, text = 0)
self.label7.grid(row = 14, column = 6, columnspan = 1, sticky = 'E')
def QUESTION1(self):
if self.a1button['text'] == self.label6['text']:
tkMessageBox.showinfo("CORRECT", "WELL DONE")
label7 = +100
app.refresh
else:
tkMessageBox.showinfo("INCORRECT", "YOU FULLY GOT IT WRONG :/")
label7 = -100
app.refresh