> I wish I understood Tkinter better; I've looked at most of the on-line
> stuff, ...
> well, after I deliver this one program with Tk, I think I'm going to
> switch
> to wxPython for future GUI front-ends.
Most of the issues discssed on this thread apply to every GUI environment.
They all basic
[Keeping Tutor in CC]
-- Forwarded message --
Date: Fri, 7 Oct 2005 01:25:26 -0700 (PDT)
From: Mike Cheponis <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Simple Tkinter question (fwd)
On Fri, 7 Oct 2005, Danny Yoo wrote:
> Ok,
>> The problem is that the GUI needs control back to be able to update the
>> GUI display.
>
> Thanks, but what I don't understand is:
>
> Why doesn't the call tv.set("string") update what's on the screen.
> Clearly,
> Tkinter has control at that point, and there's no reason to delay updating
> t
> def my_update():
> for i in range(3):
> tv.set("Now it's %d"%i)
> sleep(1)
>
> Button(text="Update", command=my_update).pack()
> root.mainloop()
>
>
> What happens when I hit the Update button is a 3-second pause, then "Now
> it's 2" is displayed.
This is a common gotcha in GUI progra
> Danny, I got it:
>
> from Tkinter import *
> from time import *
>
> def my_update():
>for i in range(3):
> tv.set("Now it's %d"%i)
> root.update()
> sleep(1)
>
> root=Tk()
> tv=StringVar()
> Entry(textvariable=tv).pack()
> tv.set("Initial Value of StringVar")
> Button(text="Upd
-- Forwarded message --
Date: Thu, 6 Oct 2005 23:55:26 -0700 (PDT)
From: Mike Cheponis <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Simple Tkinter question
Danny, I got it:
from Tkinter import *
from time import *
def my_update():
-- Forwarded message --
Date: Thu, 6 Oct 2005 22:07:50 -0700 (PDT)
From: Mike Cheponis <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Simple Tkinter question
On Thu, 6 Oct 2005, Danny Yoo wrote:
>> from Tkinter import *
&
On Thu, 6 Oct 2005, Mike Cheponis wrote:
> I'm trying to update an Entry's textvariable several times within my
> Button handler, like so:
>
> from Tkinter import *
> from time import *
>
> def my_update():
>for i in range(3):
> tv.set("Now it's %d"%i)
> sleep(1)
>
> root=Tk()
> tv
I'm trying to update an Entry's textvariable several times within my Button
handler, like so:
from Tkinter import *
from time import *
def my_update():
for i in range(3):
tv.set("Now it's %d"%i)
sleep(1)
root=Tk()
tv=StringVar()
Entry(textvariable=tv).pack()
tv.set("Initial Value o