[Tkinter-discuss] A Button command callback question...

GKalman kalman_g at msn.com
Mon Jul 18 05:34:22 CEST 2011

The following code fragment works OK.  Question: why?
from Tkinter import *


def doIt():

btn=Button(root,text="do", bg="cyan",command=doIt).pack()

My question is: how is the instance lbl.config(...) recognized in the doIt
callback fn when called from the main w/o an argument referencing lbl?

View this message in context: http://old.nabble.com/A-Button-command-callback-question...-tp32080551p32080551.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110717/9d99df59/attachment.html>

More information about the Tkinter-discuss mailing list