[Tkinter-discuss] Third-party ttk themes
Michael Lange
klappnase at web.de
Wed Jun 17 11:33:11 CEST 2015
Hi,
On Thu, 07 May 2015 02:07:26 -0700
memilanuk <memilanuk at gmail.com> wrote:
> So... using Anaconda 2.2.0 / Python 3.4.3 on Linux, and the only ttk
> themes that came with are 'clam', 'alt', 'default' and 'classic'. I've
> seen reference to other theme names like 'aqua', 'step', 'winnative',
> 'vista' and 'xpnative'. Are these themes - or others like them -
> available somewhere, some sort of theme repository?
as Kevin already pointed out, on linux you can only use these four
built-in themes, however if you are interested in more themes you can try
the tile-themes from http://tktable.cvs.sourceforge.net/viewvc/tktable/
IIRC the qt ang tk themes are outdated and will not work, the other five
pixmap themes work fine (and personally I think the "plastik" theme is
really nice).
Unfortunately there is no such thing as an installer, you would have to
download the tile-themes folder manually, copy it
into /usr/share/tile-themes and add the missing pkgIndex.tcl file that
should contain the lines:
set themesdir [file join [pwd] [file dirname [info script]]]
lappend auto_path $themesdir
so Tk will be able to find the themes.
Then you can load the themes with:
root.tk.call('package', 'require', 'tile-themes')
and see if it worked wtih:
themes = root.tk.call('ttk::themes')
print(themes)
Unfortunately theme_names() will still fail to find these third party
themes, but ttk::themes works fine.
Best regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
When dreams become more important than reality, you give up travel,
building, creating; you even forget how to repair the machines left
behind by your ancestors. You just sit living and reliving other lives
left behind in the thought records.
-- Vina, "The Menagerie" ("The Cage"), stardate unknown
More information about the Tkinter-discuss
mailing list