|
Control variables. What is the difference between IntVar, BooleanVar,
StringVar, and DoubleVar? For example, in the program below, it looks
like I get the same result usint IntVar or StringVar. It almost appears
the usage depends on what widget one uses: Entry, RadioButton,
CheckBox, ... ===================begin========= from Tkinter import * # Use of control variables def mycallback(): print "User entered:" , e.get() print "Operationg by 2 gives: ", e.get()*2 master = Tk() v=StringVar() #v=IntVar() print v,type(v) e = Entry(master,textvariable=v) e.pack() b = Button(master, text="Push to Print", width=10, command=mycallback) b.pack() e.focus_set() v.set(123) mainloop() =====================End============= Alan Gauld wrote:
--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
“In mathematics you don't understand things.
You just get used to them.” -- John Von Neumann
(P.S. The same is true in life.)
Web Page: <www.speckledwithstars.net/> |
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
