Combo Box (MSAA UI Element Reference)
Note
This topic describes Combo Box objects for purposes of MSAA UI Element Reference. How to create Combo Box objects in various UI frameworks is not described here. See the API reference documentation for the UI framework you're using.
A combo box is a list box combined with a static control or an edit control that displays the currently selected item in the list box portion of the combo box. The list box portion of the control is displayed at all times or only drop down when the user selects the drop-down arrow (which is a push button) next to the control. If the selection field is an edit control, the user can enter information not in the list; otherwise, the user can only select items in the list.
The window class name for a combo box is "COMBOBOX".
The contents of the IAccessible properties depend on which of the following parts of the combo box is queried by the client:
- The combo box window
- The edit control or static text control
- The drop-down arrow (which is a push button)
- The list box
- The list items in the list box
IAccessible Methods
Combo boxes support the following IAccessible methods:
IAccessible Properties
Combo boxes support the following IAccessible properties:
get_accChildCount—The following table shows the child count value for different parts of the combo box.
Combo box part ChildCount Combo box window 3 Edit control 0 Drop-down arrow 0 List box The number of list items List item 0 get_accDefaultAction—The following table shows the DefaultAction property for different parts of a combo box.
Combo box part DefaultAction Combo box window None Edit control None Drop-down arrow "Open" or "Close" depending on the state of the drop-down list List box None List item "Double Click" get_accKeyboardShortcut—The following table shows the KeyboardShortcut property for different parts of a combo box.
Combo box part KeyboardShortcut Combo box window Access key of associated label Edit control None Drop-down arrow "Alt+Down Arrow" List box None List item None The access key for a combo box is the underlined character in the text from an associated static text control that labels the combo box. For example, on a standard Open dialog box that opens files, such as in Microsoft WordPad, the combo box labeled "Files of type:" has the KeyboardShortcut "Alt+t".
get_accName—The following table shows the Name property for different parts of a combo box.
Combo box part Name Combo box window Static text control used as a label Edit control Static text control used as a label Drop-down arrow "Open" or "Close" depending on the state of the drop-down list List box Associated label List item Text of the list item The Name property of a combo box, its child edit control, and its child list box is the text from an associated static text control that labels the combo box. For example, on a standard Open dialog box that opens files, such as in WordPad, the Name properties for the two combo boxes are "Look in:" and "Files of type:".
get_accParent—The following table shows the parent value for different parts of a combo box.
Combo box part Parent Combo box window A window with the Role property of ROLE_SYSTEM_WINDOW that surrounds the combo box and has the same Name property and window class name as the combo box. Edit control (or static text control) The combo box window. Drop-down arrow The combo box window. List box parent window The combo box window. This window surrounds the list box. List box The list box parent window. List item The list box. get_accRole—The following table shows the Role property for different parts of a combo box.
Combo box part Role Combo box window ROLE_SYSTEM_COMBOBOX Edit control (or static text control) ROLE_SYSTEM_TEXT or ROLE_SYSTEM_STATICTEXT Drop-down arrow ROLE_SYSTEM_PUSHBUTTON List box ROLE_SYSTEM_LIST List item ROLE_SYSTEM_LISTITEM get_accState—The following table shows the State property for different parts of a combo box.
Combo box part Possible states Combo box window STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_NORMAL | STATE_SYSTEM_EXPANDED | STATE_SYSTEM_COLLAPSED Edit control STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_NORMAL Drop-down arrow 0, which means the button is visible and not pressed; or STATE_SYSTEM_PRESSED | STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_NORMAL List box STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_FLOATING | STATE_SYSTEM_NORMAL List item STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_SELECTABLE | STATE_SYSTEM_SELECTED | STATE_SYSTEM_NORMAL get_accValue—The following table shows the Value property for different parts of a combo box.
Combo box part Value Combo box window Text of currently selected list item Edit control Text of currently selected list item Drop-down arrow None List box None List item None
Notes
- When accNavigate is called with the NAVDIR_NEXT flag on the list box part of a combo box, it incorrectly navigates to the tray window when it should return VT_EMPTY.
Related topics