Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ComboBox Control Type

This topic provides information about Microsoft UI Automation support for the ComboBox control type.

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 appears 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 that is not in the list; otherwise, the user can only select items in the list.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the ComboBox control type. The UI Automation requirements apply to all combo box controls where the UI framework/platform integrates UI Automation support for control types and control patterns.

This topic contains the following sections.

Typical Tree Structure

The following table depicts a typical control and content view of the UI Automation tree that pertains to combo box controls and describes what can be contained in each view. For more information about the UI Automation tree, see UI Automation Tree Overview.

Control ViewContent View
  • ComboBox
    • Edit (0 or 1)
    • List (0 or 1)
    • List Item (child of List; 0 to many)
    • Button (1)
  • ComboBox
    • List Item (0 to many)


The edit control in the control view of the combo box is necessary only if the combo box can be edited to take any input, as is the case of the combo box in the Run dialog box.

Relevant Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the ComboBox control type. For more information about UI Automation properties, see Retrieving Properties from UI Automation Elements.

UI Automation PropertyValueNotes
UIA_AutomationIdPropertyIdSee notes.The value of this property must be unique among all peer elements in the raw view of the UI Automation tree.
UIA_BoundingRectanglePropertyIdSee notes.The outermost rectangle that contains the whole control.
UIA_ClickablePointPropertyIdSee notes.Supported if there is a bounding rectangle. If not every point within the bounding rectangle is clickable, and the element performs specialized hit testing, override and provide a clickable point.
UIA_HelpTextPropertyIdSee notes.The help text for combo box controls should explain why the user is being asked choose an option from the combo box. The text is similar to information presented through a tooltip. For example, "Select an item to set the display resolution of your monitor."
UIA_IsContentElementPropertyIdTRUECombo box controls are always included in the content view of the UI Automation tree.
UIA_IsControlElementPropertyIdTRUECombo box controls are always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyIdTRUECombo box controls can receive keyboard focus; however, when a UI Automation client sets focus to a combo box, any item in the combo box subtree can receive the focus.
UIA_LabeledByPropertyIdSee notes.Combo box controls typically have a static text label that this property references.
UIA_LocalizedControlTypePropertyIdSee notes.Localized string corresponding to the ComboBox control type. The default value is "combo box" for en-US or English (United States).
UIA_NamePropertyIdSee notes.The name of the combo box control is typically generated from a static text label. If there is not a static text label, you must assign a value for the Name property. The Name property should never contain the current contents of the combo box or change when the contents of the combo box change.


Required Control Patterns

The following table lists the UI Automation control patterns required to be supported by all combo box controls. For more information on control patterns, see UI Automation Control Patterns Overview.

Control PatternSupportNotes
IExpandCollapseProvider RequiredThe ExpandCollapse control pattern must be supported because a combo box control must always contain a drop-down button.
ISelectionProvider DependsDisplays the current selection in the combo box. Support for the Selection control pattern is delegated to the list box beneath the combo box, but may not always be feasible.
IValueProvider DependsIf the combo box can take arbitrary text values, the Value control pattern must be supported. This pattern enables the string contents of the combo box to be set programmatically. If the Value control pattern is not supported, the user must select from the list items within the subtree of the combo box.
IScrollProvider NeverThe Scroll control pattern is never supported directly on a combo box. It is supported if a list box contained within a combo box can scroll, and only when the list box is visible on the screen.


Required Events

The following table lists the UI Automation events that combo box controls are required to support. For more information on events, see UI Automation Events Overview.

UI Automation EventNotes
UIA_BoundingRectanglePropertyId property-changed event.
UIA_IsEnabledPropertyId property-changed event.If the control supports the IsEnabled property, it must support this event.
UIA_IsOffscreenPropertyId property-changed event.If the control supports the IsOffscreen property, it must support this event.
UIA_ExpandCollapseExpandCollapseStatePropertyId property-changed event.
UIA_ValueValuePropertyId property-changed event.If the control supports the Value control pattern, it must support this event.


Related topics

UI Automation Control Types Overview
UI Automation Overview



Community Additions

© 2015 Microsoft