Python 2.7 - ttk 模块似乎在 Windows 8.1 中不起作用

Python 2.7 - ttk module seemingly not working in Windows 8.1

我的应用程序的 GUI 是基于 Tkinter 的,它非常实用。我一直在尝试使用 ttk 使其看起来更现代。我在 Windows 8.1 中使用 Python 2.7。导入 ttk 没有错误,脚本中包含 ttk 的编码运行也没有错误。但是,生成的界面看起来与仅使用 Tkinter 完成的界面几乎相同。按钮尤其如此。我尝试了不同的 ttk styles,它们看起来几乎与仅基于 Tkinter 的界面相同或更差。

我系统中的 Tkversion 是 8.5。我一直在使用作为 Python 2.7 本身的一部分的 ttk。我尝试从 https://pypi.python.org/pypi/pyttk 安装 pyttk-0.3.2,但即使尝试了几次,它的安装总是失败。

我的问题是:

此外,您能否推荐一个使用 Tkinter 和 ttk 在 Python 2.7 中编码的软件(希望是最小的——意味着不需要安装太多外部库)?这将帮助我作为在我的计算机中测试 ttk 的参考点。

提前致谢!

更新了代码和屏幕截图:(回应@Bryan Oakley)

这是我使用的代码:

from Tkinter import *
import ttk

root = Tk()
root.geometry("")
root.title("classic")

button_1 = Button(root, text='Tkinter')
button_1.grid(row=0, column=0, padx=10, pady=10)

button_2 = ttk.Button(root, text='ttk')
button_2.grid(row=0, column=1, padx=10, pady=10)

style = ttk.Style()
style.theme_use('classic')

root.mainloop()

七种ttk主题样式可供选择:'winnative'、'clam'、'alt'、'default'、'classic'、'vista'、'xpnative'

这是每种类型的屏幕截图(更新于 4 月 20 日):

你的问题没有提到它,但你应该也有一个可用的 "vista" 主题。尝试使用该主题。您也可以尝试 not 设置主题,并依赖默认值(我认为应该是 "vista")。

解决您的具体问题:

Is there a known problem of Python 2.7's module ttk not playing nice under Windows 8.1?

我不知道。

Is there a possibility of error in ttk libraries even though it never results in error during import or running code with ttk?

这不太可能,但显然有可能。

Do i really need to install pyttk-0.3.2?

不,你不知道。