doScroll method

[This documentation is preliminary and is subject to change.]

Simulates a click on a scroll bar component.

Syntax

HRESULT retVal = object.doScroll(component);

Standards information

There are no standards that apply here.

Parameters

component [in, optional]

Type: VARIANT

A BSTR that specifies how the object scrolls, using one of the following values.

scrollbarDown

Default. Down scroll arrow is at the specified location.

scrollbarHThumb

Horizontal scroll thumb or box is at the specified location.

scrollbarLeft

Left scroll arrow is at the specified location.

scrollbarPageDown

Page-down scroll bar shaft is at the specified location.

scrollbarPageLeft

Page-left scroll bar shaft is at the specified location.

scrollbarPageRight

Page-right scroll bar shaft is at the specified location.

scrollbarPageUp

Page-up scroll bar shaft is at the specified location.

scrollbarRight

Right scroll arrow is at the specified location.

scrollbarUp

Up scroll arrow is at the specified location.

scrollbarVThumb

Vertical scroll thumb or box is at the specified location.

down

Composite reference to scrollbarDown.

left

Composite reference to scrollbarLeft.

pageDown

Composite reference to scrollbarPageDown.

pageLeft

Composite reference to scrollbarPageLeft.

pageRight

Composite reference to scrollbarPageRight.

pageUp

Composite reference to scrollbarPageUp.

right

Composite reference to scrollbarRight.

up

Composite reference to scrollbarUp.

Return value

Type: HRESULT

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

Remarks

The IHTMLElement2::doScroll method is available on all objects, regardless of whether they support scrollbars.

Cascading Style Sheets (CSS) allow you to scroll on all objects through the IHTMLRuleStyle::overflow property.

When the content of an element changes and causes scroll bars to display, the IHTMLElement2::doScroll method might not work correctly immediately following the content update. When this happens, you can use the IHTMLWindow2::setTimeout method to enable the browser to recognize the dynamic changes that affect scrolling.

See also

Reference

IHTMLElement2::componentFromPoint

HTMLFrameSiteEvents::onscroll

 

 

Build date: 6/12/2012