Share via


IScrollProvider::SetScrollPercent Method

Sets the horizontal and vertical scroll position as a percentage of the total content area within the control.

Syntax

HRESULT SetScrollPercent(      
    double horizontalPercent,
    double verticalPercent
);

Parameters

  • horizontalPercent
    [in] The horizontal position as a percentage of the content area's total range, or UIA_ScrollPatternNoScroll if there is no horizontal scrolling.
  • verticalPercent
    [in] The vertical position as a percentage of the content area's total range, or UIA_ScrollPatternNoScroll if there is no vertical scrolling.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method is only useful when the content area of the control is larger than the visible region.

See Also

UI Automation Providers Overview