如何使用“本机"用 Tkinter 看 GUI? [英] How to use the "native" GUI look with Tkinter?

查看:33
本文介绍了如何使用“本机"用 Tkinter 看 GUI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,Tkinter 仍然使用旧的 Windows 2000 风格的小部件(随机示例):

By default Tkinter still uses the old Windows 2000-style widgets (random example):

但我希望它改用 Windows XP/Vista/7 风格的小部件:

but I want it to use the Windows XP/Vista/7-style widgets instead:

我该怎么做?我更喜欢使用最新的样式版本,所以 Windows 7 > Vista > XP > 2000.

How can I do this? I would prefer to use the latest style version, so Windows 7 > Vista > XP > 2000.

推荐答案

在 Windows 上,使用 tkinter.ttk 获取 Tk 的主题版本.

On Windows, use tkinter.ttk to get the the themed version of Tk.

这篇关于如何使用“本机"用 Tkinter 看 GUI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆