IUIAutomationTextPattern interface (uiautomationclient.h)

Provides access to a control that contains text.


The IUIAutomationTextPattern interface inherits from the IUnknown interface. IUIAutomationTextPattern also has these types of members:


The IUIAutomationTextPattern interface has these methods.


Retrieves a text range that encloses the main text of a document. (IUIAutomationTextPattern.get_DocumentRange)

Retrieves a value that specifies the type of text selection that is supported by the control. (IUIAutomationTextPattern.get_SupportedTextSelection)

Retrieves a collection of text ranges that represents the currently selected text in a text-based control. (IUIAutomationTextPattern.GetSelection)

Retrieves an array of disjoint text ranges from a text-based control where each text range represents a contiguous span of visible text. (IUIAutomationTextPattern.GetVisibleRanges)

Retrieves a text range enclosing a child element such as an image, hyperlink, Microsoft Excel spreadsheet, or other embedded object.

Retrieves the degenerate (empty) text range nearest to the specified screen coordinates. (IUIAutomationTextPattern.RangeFromPoint)


Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]
Target Platform Windows
Header uiautomationclient.h (include UIAutomation.h)

See also

Control Pattern Interfaces for Clients