May 2018
Beginner to intermediate
452 pages
11h 26m
English
The Treeview is a ttk widget designed to show columns of data in a hierarchical structure.
Perhaps the best example of this kind of data is a filesystem tree:
To explore how Treeview works, we'll create a simple file browser with some help from pathlib.
In previous chapters, we used os.path to work with file paths. pathlib is a new addition to the Python 3 standard library that provides a more object-oriented approach to paths.
Open a new file called treeview_demo.py and start with this template:
import tkinter as tk from ...
Read now
Unlock full access