access properties of parent widget in Tkinter

Silvia Rovati silvia.rovati at spaziozerouno.it
Thu Jun 16 14:50:15 CEST 2005


Hi.
I think that using "backgrounding" doesn't solve your problem. I suppose
that you must fork the processes to let them run independently and
separately.
Best regards
Silvia

-----Original Message-----
From: python-list-bounces+silvia.rovati=spaziozerouno.it at python.org
[mailto:python-list-bounces+silvia.rovati=spaziozerouno.it at python.org]On
Behalf Of Kent Johnson
Sent: giovedi 16 giugno 2005 14:33
To: python-list at python.org
Subject: Re: access properties of parent widget in Tkinter


William Gill wrote:
> I am trying to get & set the properties of a widget's parent widget.
> What I have works, but seems like a long way around the block.  First I
> get the widget name using w.winfo_parent(), then i convert the name to a
> reference using nametowidget().
>
>   self.nametowidget(event.widget.winfo_parent()).hasChanged= True

Personally I think it is bad design for a widget to assume anything about
its enclosing environment. What about passing a StringVar or IntVar to the
child widget and letting it work with that?

Kent
--
http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list