Python Tkinter ttk introduction

Python Tkinter ttk introduction

tkinter ttk themed widgets

The tkinter.ttk module provides access to the Tk themed widget set, introduced in Tk 8.5. Using the Ttk widgets gives the application an improved look and feel.

1) Platform-specific appearance
  Your application can look like a Windows application under Windows, like a Linux app under Linux, and so on, without any change to your program.
2) Simplication of the widgets behaviour
  The ttk module collapses a lot of the special cases into a simple system.
3) 6 new widgets
   Combobox, Notebook, Progressbar, Separator, Sizegrip and Treeview.


Importing ttk:
import tkinter.ttk from tkinter import ttk from tkinter.ttk import *

ttk widgets set:
Ttk comes with 18 widgets, twelve of which already existed in tkinter: Button, Checkbutton, Entry, Frame, Label, LabelFrame, Menubutton, PanedWindow, Radiobutton, Scale, Scrollbar, and Spinbox. The other six are new: Combobox, Notebook, Progressbar, Separator, Sizegrip and Treeview.

We discuss them one by one in upcoming articles.