Share via


ITextRangeProvider::ScrollIntoView Method

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

Syntax

HRESULT ScrollIntoView(      
    BOOL alignToTop
);

Parameters

  • alignToTop
    [in] TRUE if the text control should be scrolled so 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

Returns S_OK if successful, or an error value otherwise.

Remarks

ITextRangeProvider::ScrollIntoView 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.

See Also

UI Automation Providers Overview, ITextProvider