[Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables
alan.gauld at btinternet.com
Wed Mar 4 20:32:57 CET 2009
"Wayne Watson" <sierra_mtnview at sbcglobal.net> wrote
> I'm not sure what normal is. Do you have an example,
> Is this what you have in mind
> from Tkinter import *
> master = Tk()
> e = Entry(master)
> def callback():
> print e.get()
> b = Button(master, text="get", width=10, command=callback)
Yes thats exactly what I had in mind.
> This begs the question as to why one would use control variables at
> From a light reading of the subject, it seems as though they may
> in certain circumstances of coupling.
Yes, although you can still do it by hand.
> One special quality of a control variable is that it can be shared
> by a
> number of different widgets, and the control variable can remember
> all the widgets that are currently sharing it.
This is fairly rare in my experience but it would be handy. But OTOH
its sufficiently complex that I might prefer to make that complexity
explicit so that I remember its there!
More information about the Tutor