Re: change text of a Tkinter Button by clicking it

2011-09-29 Thread Sean McIlroy
never mind. i found it. -- http://mail.python.org/mailman/listinfo/python-list

Re: change text of a Tkinter Button by clicking it

2011-09-29 Thread Peter Otten
Sean McIlroy wrote: hello (how) can you change the text of a Tkinter Button by clicking it? something like def click(index): return lambda: buttons[index].text = 'hello' buttons = [Button(root,command=click(index)) for index in range(numbuttons)] only with an attribute that Buttons

change text of a Tkinter Button by clicking it

2011-09-28 Thread Sean McIlroy
hello (how) can you change the text of a Tkinter Button by clicking it? something like def click(index): return lambda: buttons[index].text = 'hello' buttons = [Button(root,command=click(index)) for index in range(numbuttons)] only with an attribute that Buttons actually have. sorry to have to