作者:
IAMPF (PF)
2015-12-20 12:25:09各位大大們好
最近在研究Tkinter寫視窗程式,遇到一個問題
比如我今天創一個Button
def a():
print 'Hello'
b = Button(root, text='click', command=a)
問題就在這個command=a
通常a這個function不能帶參數
有辦法寫一個a是可以傳參數進去的嗎
比如
def a(arg1, arg2):
print arg1, arg2
不知道要改的地方是在Button那邊還是說在a那邊