color propagation in tkinter

Alan G Isaac alan.isaac at gmail.com
Mon Apr 20 15:21:18 EDT 2009


> On Apr 20, 12:35 pm, Alan G Isaac <alan.is... at gmail.com> wrote:
>> If I want to propagate changes to a font,
>> I can just use a named font.
>>
>> What if I want to propagate color changes?
>> (E.g., a change in background color for
>> a number of widgets.)



On 4/20/2009 1:59 PM Mike Driscoll apparently wrote:
> One way would be to keep a list of the widgets that you want to be
> able to change the color of, and then loop over the list and change
> their respective colors as needed.


Yes, that's what I am currently doing.
But it seems that that is exactly the kind of thing
we are enabled to avoid with e.g., named fonts.
So I was hoping for an equivalent functionality
for colors.  From your answer, I am guessing there
is none.

This is an example where different behavior by
StringVar could have been put to good use, I think.

Thanks,
Alan



More information about the Python-list mailing list