ListView Control

[This is preliminary documentation and subject to change.]

This is a listview control displaying a single column of values with an icon next to each item. It enables the user to select a value of a property from a pre-authored list of choices. This control supports single select listviews only. The possible values are read from the ListView Table.

Note  The string displayed is not necessarily the same as the value that the user is choosing. If the control is created with the Sorted, the items are listed according to the Ordering column of the table. If the style bit is not set, the column is ignored.

Property

The property associated with this control can be string or integer valued.

Valid Style Bits

Enabled
FixedSize
IconSize
ImageHandle
Indirect
Integer
Sorted
Sunken
Visible

Valid Control Attributes

Enabled
Indirect
IndirectPropertyName
Position
PropertyName
PropertyValue
Text
Visible
WindowHandle

Control Events Published

None.

Can Take Focus

Windows: Yes.

Remarks

The control is created with the WC_LISTVIEW class with the LVS_REPORT, LVS_NOCOLUMNHEADER, WS_VSCROLL, WS_HSCROLL, LVS_SHAREIMAGELISTS, LVS_SINGLESEL, LVS_SHOWSELALWAYS, WS_BORDER, WS_TABSTOP styles.

If the Sorted style bit is not on, the control also has the LVS_SORTASCENDING style.

For compatibility with screenreaders, when authoring a dialog with an ListView control as the first active control, you must make the text field belonging to the edit field the first active control in the Dialog Table. Since the static text cannot take focus, when the dialog is created the edit field will have the focus initially as intended, but doing this ensures that screenreaders show the correct information.