Tkinter Button widget

Fuzzyman fuzzyman at gmail.com
Thu Jul 14 21:50:49 CEST 2005



Peter Otten wrote:
> Shankar Iyer (siyer at Princeton.EDU) wrote:
>
[snip..]
>
> Change your source code from
>
> # wrong
> button = Tkinter.Button(..., command=some_function(),...)
>
> to
>
> # correct
> button = Tkinter.Button(..., command=some_function,...)
>
> to pass the *function* to the widget instead of the *result* of a function
> call. And, next time, remember to post some code alongside with your
> question.
>

Nice spot of mind reading there ;-)
I remember getting bitten by this one a while ago....

Regards,


Fuzzy

> Peter




More information about the Python-list mailing list