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

2011-07-19 Thread johnmc
On Sun, 17 Jul 2011 20:34:58 -0700 (PDT), GKalman wrote > The following code fragment works OK. Question: why? > #== > from Tkinter import * > root=Tk() > > lbl=Label(root,text='1').pack() > > def doIt(): > lbl.config(bg="yellow") > > btn=Button(root,text

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

2011-07-18 Thread Michael Lange
Hi, Thus spoketh GKalman unto us on Sun, 17 Jul 2011 20:34:22 -0700 (PDT): > > The following code fragment works OK. Question: why? > #== > from Tkinter import * > root=Tk() > > lbl=Label(root,text='1').pack() > > def doIt(): > lbl.config(bg="yellow")

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

2011-07-17 Thread GKalman
The following code fragment works OK. Question: why? #== from Tkinter import * root=Tk() lbl=Label(root,text='1').pack() def doIt(): lbl.config(bg="yellow") btn=Button(root,text="do", bg="cyan",command=doIt).pack() root.mainloop() #=

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

2011-07-17 Thread GKalman
The following code fragment works OK. Question: why? #== from Tkinter import * root=Tk() lbl=Label(root,text='1').pack() def doIt(): lbl.config(bg="yellow") btn=Button(root,text="do", bg="cyan",command=doIt).pack() root.mainloop() #=