Tree View Control (MSAA UI Element Reference)
A tree view control displays a hierarchical list of items using lines to connect related items in a hierarchy. Each item consists of a label and an optional bitmap. Windows Explorer uses a tree view control to display directories.
The window class name for a tree view control is WC_TREEVIEW, which is defined as "SysTreeView" in Commctrl.h.
A tree view control supports the following IAccessible methods:
|accDoDefaultAction||The tree view object itself does not have a accDoDefaultAction method. Depending on the State property of an item in the tree view, accDoDefaultAction either expands or collapses the specified item.|
A tree view control supports the following IAccessible properties:
|get_accChildCount||The ChildCount property for the tree view object is the number of items contained in the tree view. The ChildCount property for each tree view item is zero.|
|get_accDefaultAction||The tree view object itself does not have a DefaultAction property. An item in the tree view that is expanded has "Collapse" as its DefaultAction property, and an item that is not expanded has "Expand" as its DefaultAction property.|
|get_accName||The Name property for the tree view object is obtained from the control's window text (or caption). This text is not displayed with the tree 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. The Name property for an item in the tree view is the text displayed in the tree view item.|
|get_accParent||The Parent property of the tree 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 each item in the tree view is the tree view object.|
|get_accRole||The tree view object has the Role property ROLE_SYSTEM_OUTLINE. Each item in the tree view has the Role property ROLE_SYSTEM_OUTLINEITEM.|
|get_accState||The State property for the tree view is a combination of one or more of the following values:
Additional possible values for the State property include:
|get_accValue||The tree view object does not have a value. The Value property for each tree view item is the indentation level of the item in the hierarchy. For example, in Windows Explorer, the item "Desktop" has a Value property of "0"; the item "My Computer", which is at the next level in the hierarchy, has a Value property of "1"; and each of the disk drives, which are at the next level in the hierarchy, have a Value property of "2".|
The accLocation property of tree view items returns the location only of the text in the item. The coordinates returned by accLocation for tree view items do not include the icon located to the left of the text.