TextPattern.RangeFromPoint(Point) 메서드

정의

지정된 화면 좌표에 가장 가까운 퇴행성(빈) 텍스트 범위를 반환합니다.

public:
 System::Windows::Automation::Text::TextPatternRange ^ RangeFromPoint(System::Windows::Point screenLocation);
public System.Windows.Automation.Text.TextPatternRange RangeFromPoint(System.Windows.Point screenLocation);
member this.RangeFromPoint : System.Windows.Point -> System.Windows.Automation.Text.TextPatternRange
Public Function RangeFromPoint (screenLocation As Point) As TextPatternRange

매개 변수

screenLocation
Point

화면 좌표의 위치입니다.

반품

지정된 위치에 가장 가까운 퇴행성 범위입니다. Null 가 반환되지 않습니다.

예외

지정된 지점이 텍스트 패턴과 연결된 외부 AutomationElement 에 있습니다.

예제

private TextPatternRange GetRangeFromPoint()
{
    return targetTextPattern.RangeFromPoint(
        _root.Current.BoundingRectangle.TopLeft);
}
Private Function GetRangeFromPoint() As TextPatternRange
    Return targetTextPattern.RangeFromPoint( _
    _root.Current.BoundingRectangle.TopLeft)
End Function

설명

화면 좌표가 이미지, 하이퍼링크, Microsoft Excel 스프레드시트 또는 기타 포함된 개체의 좌표 내에 있으면 자식 개체를 래핑하는 텍스트 범위가 반환됩니다.

숨겨진 텍스트는 무시 RangeFromPoint되지 않으므로 표시된 텍스트에서 지정된 지점에 가장 가까운 퇴행성 범위가 반환됩니다.

적용 대상

추가 정보