[Tutor] Continuously Updating A Display?

BELSEY, Dylan dylan.belsey@baesystems.com
Wed, 9 Oct 2002 09:11:54 +0930


Alternatively, try the "after" method on widgets.  This creates a callback
to a user defined function after a preset period of time.  Note: Only
referring to Tkinter at the moment.

-----Original Message-----
From: alan.gauld@bt.com [mailto:alan.gauld@bt.com]
Sent: Tuesday, 8 October 2002 19:58
To: James.Rocks@equant.com; tutor@python.org
Subject: RE: [Tutor] Continuously Updating A Display?


> I know how to create messages dialogs but how do I provide a running
> information panel ... I want it to provide information but 
> not to delay program execution.

Normally I'd do that with a label widget and just update the text 
from various points in my program. 


class TkinterApp(Frame):
   def __init__(self):
      self.MsgBrd = Label(self)
      self.MsgBoard.pack()
      # etc
   def another(self):
      # do some stuff
      self.MsgBrd['text'] = "I'm doing another thing!"
      # do some more

TkinterApp().mainloop()


Does that help?
     
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor