[Tutor] How to change the color of the title bar of the root window in Tkinter?

boB Stepp robertvstepp at gmail.com
Wed Nov 26 19:46:48 CET 2014

On Wed, Nov 26, 2014 at 11:58 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> On 26/11/14 17:39, boB Stepp wrote:
>> The application I am attempting to write will show up in the
>> foreground of our planning software. This planning software has its
>> own color scheme, which all of us are quite used to.
> Seriously? It colours its own title bars? That's really poor.
> Unless you test all employees for colour blindness first and
> don't employ those blind to your colour scheme?
> And that's probably illegal now in most western countries!

Color-blind users would not be able to be hired to do this work.
Having normal color vision is a job requirement. Of course, the title
bar colors are truly immaterial, but the colors of the isodose lines
that tell the user what dose different areas of the treatment area are
getting are critical. Contoured structures, both targets of the
radiation and organs that must be spared are all color coded. However,
my lack of skill and ignorance (as usual) is the problem...

Thankfully, Alan, you got me to thinking. And exploring. On our
systems it is difficult to know what is coming from the OS,
Solaris-10, and what is coming from the planning software. I had never
used Solaris prior to getting my current position and the last time I
had dabbled in Unix there were no windows-based interfaces, at least
not in the academic environment I was in then.

So I went into the common desktop environment without the planning
system running and verified that the planning system is in fact using
that color scheme for its windows. Which got me to wondering why the
trivial test window I created was not matching. It turns out that the
window was not getting focus unless the mouse was over the test
window, which resulted in in being totally gray except for the radio
button selected. My bad!

I have been playing with Tkinter on a Windows PC and then copying the
code over to the nearby Solaris box to see how it looks. I did not
have any need (yet) to actually click on anything, I was just looking
for the overall appearance of the window and its subelements.

But as usual you were very helpful and got my thinking (such as it is)
going in the proper direction!


More information about the Tutor mailing list