List-View Control (MSAA UI Element Reference)
Note This topic describes List-View Control objects for purposes of MSAA UI Element Reference. How to create List-View Control objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.
A list-view control displays a collection of items, each consisting of an icon and a label, and provides several ways to display and arrange the items. For example, additional information about each item is displayed in columns to the right of the icon and label. Windows Explorer uses a list-view control to display files.
The window class name for a list-view control is WC_LISTVIEW, which is defined as "SysListView" in Commctrl.h.
A list-view control supports the following IAccessible methods:
|accDoDefaultAction||The list-view object itself does not have a DefaultAction property; however, the accDoDefaultAction method double clicks list-view items.|
A list-view control supports the following IAccessible properties:
|get_accChildCount||The ChildCount property is the number of items in the list.|
|get_accDefaultAction||The list-view object itself does not have a DefaultAction property; however, the DefaultAction property for each list-view item is "Double Click".|
|get_accDescription||The list-view object itself does not support the Description property; however, the Description property for each list-view item is the text contained in the item's second and subsequent columns. A comma is inserted between the text for each column.|
|get_accKeyboardShortcut||List-views objects do not have keyboard shortcuts. However, if the window text for the list-view control contains an ampersand (&) character, Microsoft Active Accessibility returns a non-Null string as the KeyboardShortcut property.|
|get_accName||The Name for the list-view object is obtained from the control's window text (or caption). This text is not displayed with the list-view control, so server developers must provide meaningful text in the control's resource definition statement to help users of client utilities to identify the control. For the list-view items, the Name property is the text of the list item.|
|get_accParent||The Parent of the list-view object is a window ( ROLE_SYSTEM_WINDOW ) that surrounds the control and has the same Name property and window class name as the control. The Parent property of the list-view items is the list-view object.|
|get_accRole||The Role of ROLE_SYSTEM_LIST, and each item in the list-view control has the Role property of ROLE_SYSTEM_LISTITEM.|
|get_accState||The State property of the list-view object is a combination of one or more of the following values:
The State property of the list-view items is a combination of one or more of the following values:
STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_SELECTABLE | STATE_SYSTEM_SELECTED | STATE_SYSTEM_MULTISELECTABLE | STATE_SYSTEM_HOTTRACKED | STATE_SYSTEM_OFFSCREEN | STATE_SYSTEM_NORMAL
Additionally, check box list-view items also have the state STATE_SYSTEM_CHECKED.
- Microsoft Active Accessibility does not expose list-view item text in applications that use a callback function to add the text to the item.
- List-view items that are clipped do not have STATE_SYSTEM_INVISIBLE set. To determine if a list item is clipped, clients can compare the item's coordinates returned by accLocation with the clipping region of the window.
- Microsoft Active Accessibility does not support using the accNavigate method to navigate to the header control within a list-view control that is in Details view. However, clients use the AccessibleObjectFromPoint function to get to the header control.
- For non-rectangular objects such as list-view items in the Details view, the coordinates of the item's bounding rectangle retrieved by accLocation fail if tested with accHitTest because accHitTest determines the object's boundaries on a pixel-by-pixel basis.