List Box (MSAA UI Element Reference)

Note  This topic describes List Box objects for purposes of MSAA UI Element Reference. How to create List Box objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.

List boxes display a list from which a user can select one or more items. A list box is created with a vertical scroll bar, a horizontal control bar, or both.

The window class name for a list box is "LISTBOX".

IAccessible Methods

List boxes support the following IAccessible methods:

MethodComments
accDoDefaultAction The list box object itself does not have a DefaultAction property; however, accDoDefaultAction double clicks list box items.
accHitTest The accHitTest method returns zero if the tested point is within the list box but not on an item in the list box. If the tested point is on an item in the list box, accHitTest returns the index of the list box item.
accLocation
accNavigate
accSelect

 

IAccessible Properties

List boxes support the following IAccessible properties:

PropertyComments
get_accChild The ChildCount property is the number of items in the list box.
get_accDefaultAction The list box object itself does not have a DefaultAction property; however, the DefaultAction property for each list item is "Double Click".
get_accDescription
get_accFocus
get_accHelp
get_accHelpTopic
get_accKeyboardShortcut The KeyboardShortcut property is the list box access key, which is an underlined character in the text of the label associated with the list box. The returned string contains the access key character appended to the string "Alt+".
get_accName The Name property for the list box object is the text from a static text control that labels the list box. For the list box items, the Name property is the text of the list item.
get_accParent The Parent property is a window ( ROLE_SYSTEM_WINDOW ) that surrounds the list box and has the same Name property and window class name as the list box. The Parent property of the list box items is the list box object.
get_accRole The Role property is ROLE_SYSTEM_LIST. The items in the list box have the Role property of ROLE_SYSTEM_LISTITEM.
get_accSelection The Selection property retrieves the selected items in the list box.
get_accState The State property of the list box object is a combination of one or more of the following values:

STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_OFFSCREEN

The State property of the list box item is a combination of one or more of the following values:

STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_SELECTABLE | STATE_SYSTEM_MULTISELECTABLE | STATE_SYSTEM_SELECTED | STATE_SYSTEM_OFFSCREEN | STATE_SYSTEM_NORMAL

 

Related topics

IAccessible Interface
Combo Box
Scroll Bar

 

 

Community Additions

ADD
Show:
© 2014 Microsoft