Re: A Simple Tkinter Control Program--Slight Problem

2009-03-06 Thread W. eWatson
I like to see closure on a thread. This should do it. from Tkinter import * # Use of control variables and callbacks def mycallback(): print "User entered:" , e.get() print "Operation by 2 gives: ", e.get()*2, "and", v.get()*2 master = Tk() #v=StringVar() v=IntVar() print v,type(v) pri

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread W. eWatson
Marc 'BlackJack' Rintsch wrote: On Wed, 04 Mar 2009 10:09:10 -0800, W. eWatson wrote: Here's what I think the author meant in discussing a control variable sample program. from Tkinter import * v=Tk.StringVar() e = Entry(master, textvariable=v) e.pac

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Mar 2009 10:09:10 -0800, W. eWatson wrote: > Here's what I think the author meant in discussing a control variable > sample program. > > from Tkinter import * > > v=Tk.StringVar() > > e = Entry(master, textvariable=v) > e.pack() > e.focus_set

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread r
On Mar 4, 12:09 pm, "W. eWatson" wrote: > Here's what I think the author meant in discussing a control variable sample > program. > > from Tkinter import * > > v=Tk.StringVar() [snip] If you do a "from Tkinter import *" then here is the proper line... v =

A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread W. eWatson
Here's what I think the author meant in discussing a control variable sample program. from Tkinter import * v=Tk.StringVar() e = Entry(master, textvariable=v) e.pack() e.focus_set() v.set("a default value") s = v.get() mainloop() The problem is th