From: MSEdit on
On Mar 24, 11:36 pm, George Petasis <petas...(a)yahoo.gr> wrote:
> στις 24/3/2010 11:14 μμ, O/H Schelte Bron έγραψε:
>
>
>
> > Georgios Petasis wrote:
> >> Ok, the following works:
>
> >> ttk::style configure TNotebook -background red
>
> >> But, this changes all notebooks. I tried to create a new layout:
>
> >> ttk::style layout System.Notebook {
> >>      Notebook.client -sticky nswe
> >> }
>
> >> When I use it on a notebook, I get the correct colour, but the
> >> tabs do not resize as supposed (and do with the default layout).
> >> What is the layout I define missing?
>
> > It is a misconception to think there even is such a thing as a
> > background color for ttk::widgets. Some themes may use a gradient or
> > a pattern for the background. So at best your strategy will only
> > work with some themes and you should reconsider if this is really
> > what you want to do.
>
> > If you still decide you want to change the background color of the
> > notebook, you don't have to create a new layout. After all, you are
> > not changing the layout, just the color. So simply use:
>
> > ttk::style configure System.TNotebook -background red
> > ttk::notebook .nb -style System.TNotebook
>
> > Schelte.
>
> Dear Schelte,
>
> Thanls, it works. I had no idea that I can configure a non-existing style....
>
> George

Have a look here for a good explication http://www.tkdocs.com/tutorial/styles.html

Its not complete yet but is an excellent intro

Martyn