ScrollPattern_SetScrollPercent function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation Component Object Model (COM) interfaces instead.
 
Scrolls a container to a specific position horizontally, vertically, or both.

Syntax

HRESULT ScrollPattern_SetScrollPercent(
  HUIAPATTERNOBJECT hobj,
  double            horizontalPercent,
  double            verticalPercent
);

Parameters

hobj

Type: HUIAPATTERNOBJECT

The control pattern object.

horizontalPercent

Type: double

The horizontal position to scroll to.

verticalPercent

Type: double

The vertical position to scroll to.

Return Value

Type: HRESULT

Returns S_OK if successful or an error value otherwise.

Remarks

The scroll area is normalized to range from 0.0 to 100.0. If the position is set to 0.0, the control scrolls to the beginning of the visible region, and if the position is set to 100.0, it scrolls to the end of the visible region. Pass -1.0 for the percent parameters if no scrolling occurs on that axis.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header uiautomationcoreapi.h
Library Uiautomationcore.lib
DLL Uiautomationcore.dll