From: drscrypt on
OK, I am using the ttk::treeview widget and I have managed to create and
display folders and files. I have been trying to change some of the
options like background color but it is not working. As matter of
fact, I see that frames don't even have the -bg option. Is that normal
with ttk frames? How do change things like background/foreground colors
and fonts? I tried substituting the ttk::frames with regular frames and
it did not work either.


DrS
From: hae on
On 19 Okt., 22:03, drscr...(a)gmail.com wrote:
> OK, I am using the ttk::treeview widget and I have managed to create and
> display folders and files.  I have been trying to change some of the
> options like background color but it is not working.  As  matter of
> fact, I see that frames don't even have the -bg option.  Is that normal
> with ttk frames?  How do change things like background/foreground colors
> and fonts?  I tried substituting the ttk::frames with regular frames and
> it did not work either.
>
> DrS

With ttk a style/theme engine was introduced and setting background
and foreground options have been removed. So to use a different
background you would need to define a new style and set the background
color.
This has been done to manage styles consistenly in one application and
it has been bought with a higher learning curve.

I don't have completely understood how to manage a new style (always
try and error), altough there are some examples around the web.
Have a look here: http://www.tkdocs.com/tutorial/styles.html

Ruediger
 | 
Pages: 1
Prev: file tempfile
Next: ttk::checkbutton text top