Tkinter from Vis. BASIC

jmdeschamps at gmail.com jmdeschamps at gmail.com
Sat Nov 19 16:41:26 CET 2005


Terrance N. Phillip wrote:
> In VB, an easy way I indicate progress is something like
> 	do while <some process is not met>
> 	    lblNotify.foreground = randomcolor
>              lblNotify.refresh   <-----------
>              <sleep>
>           loop
>
> I want to do the same thing in Python/Tkinter:
>
>          # Wait for network to recognize the workstation:
>          while os.system("slist") != 0:
>              self.notify["fg"] = randcolor()
>              # how do I refresh label l3 at this point?
>              time.sleep(3)
>
> I've tried self.notify.grid() (I'm using the grid geometry manager
> throughout), but that didn't work, and there is no redraw() or refresh()
> method that I can see.

I know of an update_idletask() method, look it up in the tkinter doc to
see if that's what you need!




More information about the Python-list mailing list