IUIAutomationTextRange interface

Provides access to a span of continuous text in a container that supports the IUIAutomationTextPattern interface. Client applications can use the IUIAutomationTextRange interface to select, compare, and retrieve embedded objects from the text span. The interface uses two endpoints to delimit where the text span starts and ends. Disjoint spans of text are represented by an IUIAutomationTextRangeArray interface.

When to implement

UI Automation client applications do not implement IUIAutomationTextRange.

Members

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

Methods

The IUIAutomationTextRange interface has these methods.

MethodDescription
AddToSelection

Adds the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text.

Clone

Retrieves a new IUIAutomationTextRange identical to the original and inheriting all properties of the original.

Compare

Retrieves a value that specifies whether this text range has the same endpoints as another text range.

CompareEndpoints

Retrieves a value that specifies whether the start or end endpoint of this text range is the same as the start or end endpoint of another text range.

ExpandToEnclosingUnit

Normalizes the text range by the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it is longer than the specified unit.

FindAttribute

Retrieves a text range subset that has the specified text attribute value.

FindText

Retrieves a text range subset that contains the specified text.

GetAttributeValue

Retrieves the value of the specified text attribute across the entire text range.

GetBoundingRectangles

Retrieves a collection of bounding rectangles for each fully or partially visible line of text in a text range.

GetChildren

Retrieves a collection of all embedded objects that fall within the text range.

GetEnclosingElement

Returns the innermost UI Automation element that encloses the text range.

GetText

Returns the plain text of the text range.

Move

Moves the text range forward or backward by the specified number of text units .

MoveEndpointByRange

Moves one endpoint of the current text range to the specified endpoint of a second text range.

MoveEndpointByUnit

Moves one endpoint of the text range the specified number of text units within the document range.

RemoveFromSelection

Removes the text range from an existing collection of selected text in a text container that supports multiple, disjoint selections.

ScrollIntoView

Causes the text control to scroll until the text range is visible in the viewport.

Select

Selects the span of text that corresponds to this text range, and removes any previous selection.

 

Requirements

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]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

DLL

UIAutomationCore.dll

IID

IID_IUIAutomationTextRange is defined as a543cc6a-f4ae-494b-8239-c814481187a8

See also

Control Pattern Interfaces for Clients
UI Automation Support for Textual Content
Using Text Ranges

 

 

Community Additions

ADD
Show:
© 2014 Microsoft