Climbing the tree control

This chapter covers

■ Creating a tree control and adding items

■ Using styles to design the tree control

■ Navigating the tree programmatically

■ Managing the tree selection

■ Controlling the visibility of items

The tree control is the last of the three wxPython controls for displaying complex data. In this case, the tree control is designed to show data with a strong hierarchy, where you can see that each piece of data has parent and child relationships. One standard example is a file tree, where directories have subdirectories or files inside them, leading to a nested hierarchy of files. Another example is a Document Object Model (DOM) tree of an HTML or XML document. Like the list and grid controls, the tree control provides some flexibility over the display of the items, and allows you to edit tree items in place. In this chapter, we'll show you how to edit tree items and how to respond to user tree control events.

Was this article helpful?

0 0

Post a comment