ListView Class

Description

ListView is for elaborated list box controls that support multiple means of viewing data lists. These views include text view (normal list boxes), large and small rearrangable icons, and detail (or report) view.

ListView supports non-hierarchical views. For hierarchical views, see the TreeView class.

In Windows, this class corresponds to the ListView control.

Availability

This class is supported only by the Classic Agent. This class offers slightly different functions and properties from those in the class ListViewEx, which is available for use with the Open Agent.

Inheritance

ListView derives from the class Control; no classes derive from this class.

Identification of ListView Items

In a listview Detail view, each item can have one or more fields displayed in columns, and the view can typically be sorted by any column. Details view differs from a multi-column list box or table, in which individual cells can be selected.

Examples of Identifying Items

Items in a listview can be identified by the following traits:

  • The simple name of the item in the first column
  • A string containing a semicolon that specifies the content of one or more columns

The following examples show how you can identify items within a listview:

This specification... Identifies this item...
"x" An item "x" in the first column
"x;y;z" An item "x" in the first column, "y" in the second column, and "z" in the third column
"*;*; z" An item "z" in the third column
"x ; y" An item "x" in the first column, and an item "y" in the second column
"x ;*; z " An item "x" in the first column, and "z" in the third column

Supporting Custom ListViews

The following messages are used by Silk Test Classic to communicate with ListView controls.

Note: The appropriate style-bits must also be implemented.
LVM_GETITEMCOUNT LVM_GETITEMSTATE
LVM_GETCOLUMNWIDTH LVM_GETCOLUMN
LVM_GETITEM LVM_GETITEMCOUNT
LVM_GETITEMRECT LVM_GETORIGIN
LVM_ENSUREVISIBLE LVM_HITTEST

Methods and Properties

In addition to the methods and properties inherited from class AnyWin and class Control, the following methods and properties are also available to ListView objects: