tkinter.ttk — Tk 主题 Widget

源代码: Lib/tkinter/ttk.py


The tkinter.ttk module provides access to the Tk themed widget set, introduced in Tk 8.5. It provides additional benefits including anti-aliased font rendering under X11 and window transparency (requiring a composition window manager on X11).

The basic idea for tkinter.ttk is to separate, to the extent possible, the code implementing a widget’s behavior from the code implementing its appearance.

另请参阅

Tk Widget Styling Support

A document introducing theming support for Tk

Using Ttk

To start using Ttk, import its module:

from tkinter import ttk