widget communication in Tkinter

Jørgen Cederberg jorgencederberg at hotmail.com
Fri Jan 24 03:15:36 EST 2003


Stephen Boulet wrote:
> Is there a standard method for widgets to communicate with one another 
> in tkinter?
> 
> For example, if I want a button press to update a label's text field, I 
> found that I can make a MyButton class that inherits Button, and store 
> my label's config method as a MyButton method.
> 
> I was wondering if tkinter has some sort of built in mediator class to 
> handle transactions like this.

Well not exactly. But you can avoid the use of config calls, and instead 
use a StringVar to update the label. This example shows how to use it.
http://www.faqts.com/knowledge_base/view.phtml/aid/17884/fid/264

Regards
Jorgen





More information about the Python-list mailing list