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

Alan Gauld alan.gauld at btinternet.com
Wed Nov 26 18:58:54 CET 2014


On 26/11/14 17:39, boB Stepp wrote:

>> of the users preferences. Colour-blind users don't like
>> apps that mess with what they can read.
>
> 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!

There are a lot of Windows apps that do arbitrary stuff like that
but if you are on Solaris I'd expect most apps to be controlled
by resources that the user can override if need be, Hard coded
colour schemes are just evil for no good reason.

> guess, the Tkinter-produced windows do not match this scheme, not
> anything close, and I am trying to discover ways to tweak my windows
> to agree better with the planning software's display aesthetics.

The core window backgrounds etc can be coloured easily enough.
Its the stuff controlled by the Window Manager that's tougher.

What do you do for window managers that don't have a title bar
for example? (There are several...)

There's a good reason Tkinter doesn't make this easy
  - its to save you from yourself. :-)

However, if you want to know how to force it I suspect there will
be a way somehow, but you'll be more likely get the answer on the
Tkinter mailing list rather than here. Or maybe even by going
to the Tcl/Tk forums?

hth
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list