Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Installation of ttk Themes for Tkinter

$
0
0

i'm currently trying to make some of my applications i built using tkinter look better. I read that you can change the theme of tkinter using ttk and got it to work with the built-in themes.

import tkinter.ttk as ttkfrom tkinter import *import ttkthemesroot = Tk()root.geometry('400x200')ttk.Style().theme_use('alt')Button1 =ttk.Button(text="Test").pack()root.mainloop()

But as the built-in ones are kind of outdated, i began trying to install external ones from this list: https://wiki.tcl-lang.org/page/List+of+ttk+Themes . I tried pip install ttkthemes and hoped to get the "Adapta" theme to work ( https://ttkthemes.readthedocs.io/en/latest/themes.html ).I tried to import ttkthemes, but couldn't get it to work. Python cannot find the theme _tkinter.TclError: can't find package ttk::theme::adapta when executed. So how do i get those external themes imported into python?


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>