tkinterTtk widgets


Examples of the different ttk widgets. Ttk has a total of 17 widgets, eleven of which already existed in tkinter (tk).

Using ttk module gives your application a more modern and improved look.


  • tree=ttk.Treeview(master,**kwargs)


mastertkinter widgets exist in a hieararchy. Except for the root window, all widgets have a parent (also called "master"). When the widget is added to the screen with pack, place or grid, it will appear inside this parent widget


These examples assume that tkinter has been imported with either import tkinter as tk (python 3) or import Tkinter as tk (python 2).

It is also assumed that ttk has been imported with either from tkinter import ttk (python 3) or import ttk (python 2).