How to exactly set style in tkinter.ttk

Vlastimil Brom vlastimil.brom at gmail.com
Mon Dec 17 19:51:47 CET 2012


2012/12/17 Netrick <netrick at o2.pl>:
> So, we have now in python 3 the tile module
> http://tktable.sourceforge.net/tile/screenshots/unix.html integrated as
> tkinter.ttk. However, in the python and tk docs there is a lot about that
> tkk, but only how to set your own style for specific widgets. There is
> nothing on how to use that built-in theme (the one that interests me is the
> "Revitalized" one, see the link I wrote) as a global style for all widgets.
> How can I do it? I just want my python 3.3 app to use that built-in style,
> but I can't find anything in docs about it.
>
> Or we have better way for tkinter on linux to look more native and less
> ugly? (for example IDLE for python 3.3 written in tkinter looks like windows
> 95 app on linux and pretty good on windows xp).
>
> Thanks!
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Hi,
I don't use ttk myself, but it seems, that the original demo from
Guilherme Polo might contain the functionality you are looking for:
http://code.google.com/p/python-ttk/downloads/list
pyttk-samples-0.1.7.tar.gz
theming.py

in the (top-right) section "Style":  "Themes" (although I see partly
different themes on Windows7 - it's possibly platform dependent).

You may be able to find out the appropriate usage from the source code.

hth,
  vbr



More information about the Python-list mailing list