Spinner Control Type

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

Spinner controls are used to select from a domain of items or a range of numbers.

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

Typical Tree Structure

The following table depicts a typical control and content view of the UI Automation tree that pertain to spinner controls when they support the RangeValue and Selection control patterns and describes what can be contained in each view. For more information about the UI Automation tree, see UI Automation Tree Overview.

RangeValue control pattern

Control View

Content View

Spinner

Edit (0 or 1)

Button (2)

Spinner

Selection control pattern

Control View

Content View

Spinner

Edit (0 or 1)

Button (2)

List Item (0 or more)

Spinner

ListItem (0 or more)

To ensure that the two buttons in the control view subtree can be distinguished by automated test tools, assign the ScrollAmount_SmallIncrement or ScrollAmount_SmallDecrement value to the AutomationId property as appropriate. For some implementations, the associated edit control may be a peer of the spinner control.

If the control can receive keyboard focus, it must support this property. A spinner control rarely takes the focus, but when it does, the focus should remain on the spinner control itself, not on the child buttons. The user should be able to perform all scrolling actions by using the UP ARROW and DOWN ARROW keys.