Tk Interface Extension (Tix) widgets are an additional set of widgets that come with the Tk module.
In this chapter, we cover the widgets from Ioi Lam’s Tix 4.1.0 package. TList, HList, Tree, and DirTree are container-style widgets, designed to hold display items. This chapter covers:
A much more flexible Listbox that uses display items.
A hierarchical list widget, often used as a snazzy Listbox. It is the base class for Tree and DirTree.
Based on HList, it displays items in tree format. Look at DirTree for an easy way to work with filesystems .
An extension of Tree, DirTree is designed to show directories and files in a hierarchical format.
You’d use the TList widget in place of a a ListBox when you want to display something other than text or want to display individual items in different fonts or colors. HList gives you the ability to structure a list hierarchically or with elegant column headings. The Tree widget provides a simpler interface for creating an HList with indicators, and DirTree is further simplified for displaying a filesystem hierarchy.
Before we talk about the widgets individually, we need to give you some background on how display items work and how to configure them. Once that’s established, we can discuss the Tix widgets in detail.