color propagation in tkinter

Terry Reedy tjreedy at udel.edu
Mon Apr 20 22:41:31 CEST 2009


Alan G Isaac wrote:
>> 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.

You could file a feature request on the tracker if this seems reasonable.




More information about the Python-list mailing list