Click to return to the Reusing Browser Technology home page    
IHTMLTextContainer::get_s...     IHTMLTextContainer::get_s...     IHTMLTextContainer Interf...    
Web Workshop  |  Reusing Browser Technology

IHTMLTextContainer::get_scrollTop Method


Retrieves the distance, in pixels, between the top of the element and the topmost portion of the content that is currently visible in the window. This is equal to the vertical distance that the content of the element has been scrolled.

Syntax

HRESULT get_scrollTop(
    long *p 
);

Parameters

p
Address of a variable that receives the scroll-top distance.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

This read-write property is always a nonnegative integer. Although it can be set to any positive or negative value, the property is set to 0 if the assigned value is less than 0, and is set to the value of scrollHeight if the assigned value is greater than this. The default value is 0.

This property is always 0 for elements that do not have scroll bars. For these elements, setting the property has no effect.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLTextContainer::put_scrollTop Method


Sets the distance, in pixels, between the top of the element and the topmost portion of the content that is currently visible in the window. This is equal to the vertical distance that the content of the element has been scrolled.

Syntax

HRESULT put_scrollTop(
    long v 
);

Parameters

v
Value that specifies the scroll-top distance.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

This read-write property is always a nonnegative integer. Although it can be set to any positive or negative value, the property is set to 0 if the assigned value is less than 0, and is set to the value of scrollHeight if the assigned value is greater than this. The default value is 0.

This property is always 0 for elements that do not have scroll bars. For these elements, setting the property has no effect.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.