Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolTip Control Type

This topic provides information about Microsoft UI Automation support for the ToolTip control type. Tooltip controls are pop-up windows that contain text.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the ToolTip control type. The UI Automation requirements apply to all tooltip 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 tooltip 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
  • ToolTip
    • Text (0 or more)
    • Image (0 or more)
  • ToolTip

 

Tooltip controls appear only in the content view of the UI Automation tree if they can receive keyboard focus. Otherwise, all of the tooltip's information is available from the IUIAutomationElement::CurrentHelpText (or CachedHelpText) property on the element that the tooltip is referring to.

Tooltips should appear beneath the control to which their information is referring. Clients must listen for the UIA_ToolTipOpenedEventId to ensure that they consistently obtain information contained in tooltips.

Relevant Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the ToolTip 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.The clickable point should be the part of the tooltip that dismisses the control. Some tooltips do not have this ability and will not have a clickable point.
UIA_ControlTypePropertyIdToolTip
UIA_IsContentElementPropertyIdDependsIf the tooltip control can receive keyboard focus, it must appear in the content view of the tree. If it is text only, it is available as the IUIAutomationElement::CurrentHelpText (or CachedHelpText) property from the control that raised it.
UIA_IsControlElementPropertyIdTrueThe tooltip control is always included in the control view of the UI Automation tree.
UIA_IsKeyboardFocusablePropertyIdSee notes.If the control can receive keyboard focus, it must support this property.
UIA_LabeledByPropertyIdNULLTooltip controls are always self-labeled by their contents.
UIA_LocalizedControlTypePropertyIdSee notes.Localized string corresponding to the ToolTip control type. The default value is "tooltip" for en-US or English (United States).
UIA_NamePropertyIdSee notes.The name of the tooltip control is the text that is displayed within the tooltip.

 

Required Control Patterns

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

Control PatternSupportNotes
ITextProvider DependsFor better accessibility, a tooltip control can support the Text control pattern, although it is not required. The Text control pattern is useful when the text has rich style and attributes (for example, color, bold, and italics).
IWindowProvider DependsTooltips that can be closed by clicking a UI item must support the Window control pattern so that they can closed automatically.

 

Required Events

Tooltip controls must raise the UIA_ToolTipOpenedEventId event when they appear on the screen. The event will include a reference to the UI Automation element of the tooltip itself.

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

UI Automation EventNotes
UIA_AutomationFocusChangedEventId
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_NamePropertyId property-changed event.
UIA_Text_TextChangedEventIdIf the control supports the Text control pattern, it must support this event.
UIA_ToolTipClosedEventId
UIA_ToolTipOpenedEventId
UIA_StructureChangedEventId
UIA_Window_WindowClosedEventIdIf the control supports the Window control pattern, it must support this event.
UIA_Window_WindowOpenedEventIdIf the control supports the Window control pattern, it must support this event.
UIA_WindowWindowVisualStatePropertyId property-changed event.If the control supports the Window control pattern, it must support this event.

 

Related topics

Conceptual
UI Automation Control Types Overview
UI Automation Overview

 

 

Community Additions

Show:
© 2014 Microsoft