IUIAutomationTextRange 介面 (uiautomationclient.h)

提供支援 IUIAutomationTextPattern 介面之容器中連續文字範圍的存取權。 用戶端應用程式可以使用 IUIAutomationTextRange 介面,從文字範圍選取、比較及擷取内嵌物件。 介面會使用兩個端點來分隔文字範圍開始和結束的位置。 文字的脫離範圍是由 IUIAutomationTextRangeArray 介面表示。

繼承

IUIAutomationTextRange介面繼承自IUnknown介面。 IUIAutomationTextRange 也有下列類型的成員:

方法

IUIAutomationTextRange介面具有這些方法。

 
IUIAutomationTextRange::AddToSelection

將文字範圍新增至控制項中所選文字範圍的集合,該控制項支援選取的多個不相鄰文字範圍。 (IUIAutomationTextRange.AddToSelection)
IUIAutomationTextRange::Clone

擷取與原始相同的新 IUIAutomationTextRange,並繼承原始的所有屬性。
IUIAutomationTextRange::Compare

擷取值,指定此文字範圍是否與另一個文字範圍具有相同的端點。 (IUIAutomationTextRange.Compare)
IUIAutomationTextRange::CompareEndpoints

擷取值,指定這個文字範圍的開始或結束端點是否與另一個文字範圍的開始或結束端點相同。
IUIAutomationTextRange::ExpandToEnclosingUnit

依指定的文字單位正規化文字範圍。 如果範圍小於指定的單位,則範圍會展開,或者如果超過指定的單位,則會縮短範圍。 (IUIAutomationTextRange.ExpandToEnclosingUnit)
IUIAutomationTextRange::FindAttribute

擷取具有指定文字屬性值的文字範圍子集。
IUIAutomationTextRange::FindText

擷取包含指定文字的文字範圍子集。
IUIAutomationTextRange::GetAttributeValue

擷取整個文字範圍中指定之文字屬性的值。
IUIAutomationTextRange::GetBoundingRectangles

對文字範圍中每一個完整或部分可見的文字行,擷取週框的集合。 (IUIAutomationTextRange.GetBoundingRectangles)
IUIAutomationTextRange::GetChildren

擷取文字範圍內所有內嵌物件的集合。 (IUIAutomationTextRange.GetChildren)
IUIAutomationTextRange::GetEnclosingElement

傳回最內層的 UI 自動化元素,以括住文字範圍。
IUIAutomationTextRange::GetText

傳回文字範圍的純文字。
IUIAutomationTextRange::Move

將文字範圍向前或向後移動指定的文字單位數。
IUIAutomationTextRange::MoveEndpointByRange

將目前文字範圍的一個端點移至第二個文字範圍的指定端點。 (IUIAutomationTextRange.MoveEndpointByRange)
IUIAutomationTextRange::MoveEndpointByUnit

在文件範圍內,將文字範圍的一個端點移動指定的文字單元數。
IUIAutomationTextRange::RemoveFromSelection

從文字容器中支援多個不相鄰選取範圍的現有文字集合中移除文字範圍。
IUIAutomationTextRange::ScrollIntoView

使文字控制項捲動,直到檢視區中顯示文字範圍為止。
IUIAutomationTextRange::Select

選取對應至此文字範圍的文字範圍,並移除任何先前的選取範圍。 (IUIAutomationTextRange.Select)

需求

   
最低支援的用戶端 Windows 7、Windows Vista sp2 和 Platform Update for Windows Vista、Windows XP with SP3 和 Platform Update for Windows Vista [僅限桌面應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [僅限桌面應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

用戶端的控制項模式介面

文字內容的 UI 自動化支援

使用文字範圍