Chapter 9. The TreeView and ListView Controls

In Chapter 6, "Basic Windows Controls," you learned how to use the ListBox control for displaying lists of strings and storing objects. The items of a ListBox control can be sorted, but they have no particular structure. I'm sure most of you wish that the ListBox control had more "features," such as the means to store additional information along with each item or to present hierarchical lists. A hierarchical list is a tree that reflects the structure of the list: items that belong to other items appear under their parent with the proper indentation. For instance, a list of city and state names should be structured so that each city appears under the corresponding state.

The answer to the shortcomings ...

Get Mastering Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.