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

GKalman kalman_g at msn.com
Mon Jul 18 05:34:58 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...-tp32080554p32080554.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.

More information about the Tkinter-discuss mailing list