ITextRangeProvider interface
Provides access to a span of continuous text in a text container that implements ITextProvider or ITextProvider2.
Members
The ITextRangeProvider interface inherits from the IUnknown interface. ITextRangeProvider also has these types of members:
Methods
The ITextRangeProvider interface has these methods.
| Method | Description |
|---|---|
| AddToSelection |
Adds the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. |
| Clone |
Returns a new ITextRangeProvider identical to the original ITextRangeProvider 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 |
Returns a value that specifies whether two text ranges have identical endpoints. |
| 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 |
Returns a text range subset that has the specified text attribute value. |
| FindText |
Returns a text range subset that contains the specified text. |
| GetAttributeValue |
Retrieves the value of the specified text attribute across the 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 element that encloses the text range. |
| GetText |
Retrieves the plain text of the 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 TextUnit units within the document range. |
| RemoveFromSelection |
Removes the text range from the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. |
| ScrollIntoView |
Causes the text control to scroll vertically 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. |
Remarks
A range can represent an insertion point, a portion of text, or all of the text in a container.
Requirements
|
Minimum supported client |
Windows XP [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
DLL |
|
|
IID |
IID_ITextRangeProvider is defined as 5347ad7b-c355-46f8-aff5-909033582f63 |
See also
- Reference
- ITextProvider
- Conceptual
- UI Automation Providers Overview