我想产生<代码>ns>,tkinter Button
s,其中做的是不同的事。 我有这一法典:
import Tkinter as tk
for i in range(boardWidth):
newButton = tk.Button(root, text=str(i+1),
command=lambda: Board.playColumn(i+1, Board.getCurrentPlayer()))
Board.boardButtons.append(newButton)
如果<条码>登上
I need the first button to do Board.playColumn (1, Board.getCurrentPlayer()
, the second to do Board.playColumn(2, Board.getCurrentPlayer()
.