ok, i had to install ttk from https://pypi.python.org/pypi/pyttk
How to find or install themes tkinter ttk for Python
質問
I've been making a bot for the past 3 months and it works perfect just with code. Now my next goal is to make a GUI for it, however I've been finding some obstacles and the main one is the ability to not look like a 30years old program.
- I am on Windows 7.
- I am using Python 3.3.2 only (no packages, addons, plugins, other programs, etc. Just what it gets installed from http://www.python.org/download/).
- Python 3.3.2 includes the abbility (as far as i know) to use Tkinter and ttk.
However, while tkinter works fine for my tests, I've been unable to find a way to display all availible themes or a way to download more new themes.
This won't work and i have no idea why:
from tkinter import *
from tkinter.ttk import *
s=Style()
s.theme_names()
So... can anyone tell me how to display all availible themes just from IDLE 3.3.2 without installing anything else? Or where I could get more themes, since I'm looking for a modern one.
解決
他のヒント
If you still want to do it depending only on the standard library:
>>> import tkinter as tk
>>> root = tk.Tk()
>>> print(root.tk.call('ttk::themes'))
('classic', 'default', 'clam', 'winnative', 'vista', 'xpnative', 'alt')
所属していません StackOverflow