IUIAutomationTextRange::ScrollIntoView method

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

Syntax


HRESULT ScrollIntoView(
  [in] BOOL alignToTop
);

Parameters

alignToTop [in]

Type: BOOL

TRUE if the text control should be scrolled so that the text range is flush with the top of the viewport; FALSE if it should be flush with the bottom of the viewport.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The method respects both hidden and visible text. If the text range is hidden, the text control will scroll only if the hidden text has an anchor in the viewport.

A Microsoft UI Automation client can check text visibility by calling IUIAutomationTextRange::GetAttributeValue with the attr parameter set to UIA_IsHiddenAttributeId.

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

See also

IUIAutomationTextRange
UI Automation Support for Textual Content

 

 

Show: