Organizational Controls

List Controls

There are two list controls: the List View and the Tree Control.

click to view at full size.

Figure 12.6 The List View and the Tree Control

List View

A list view is a specialized list control that displays a set of objects. Users can view objects in iconic form (by displaying their large icons or small icons, as listed in the registry), as a list or as a table. A list view is often used with a tree control (described below). The list view control is also useful for implementing custom containers.

You can implement a column heading with the Visual Basic ListView control by setting the View property to 3-lvwReport and changing the column heading text. With the column heading, you can define the sort order based on the property of items in the list.

You can resize a whole column in the list by dragging the column separator, and you can sort the list by clicking the desired column. The Microsoft Mail Inbox window is an example of a column heading control. In this window, column headings show the name of the folder you currently have open , from whom the mail has come, the subject line of the mail, and the date the mail was received. Clicking the From column heading sorts the rows in alphabetical order by sender name.

Tree

A tree control is a special list control that displays a set of objects hierarchically using an indented outline format. Plus and minus icons allow the user to expand and collapse the outline. The tree control typically is used to display a directory or relationships between sets of containers.


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net