Contents Index Topic Contents | ||
Previous Topic: IHTMLTextContainer::get_scrollLeft Next Topic: IHTMLTextContainer::get_scrollWidth |
IHTMLTextContainer::get_scrollTop
HRESULT get_scrollTop( long *p );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.
- Returns S_OK if successful, or an error value otherwise.
- p
- Address of a variable that receives the scroll top distance.
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 zero if the assigned value is less than zero, and is set to the value of scrollHeight if the assigned value is greater than this. The default value is zero.
This property is always zero for elements that do not have scroll bars. For these elements, setting the property has no effect.
See also put_scrollTop
IHTMLTextContainer::put_scrollTop
HRESULT put_scrollTop( long v );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.
- Returns S_OK if successful, or an error value otherwise.
- v
- Value specifying the scroll top distance.
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 zero if the assigned value is less than zero, and is set to the value of scrollHeight if the assigned value is greater than this. The default value is zero.
This property is always zero for elements that do not have scroll bars. For these elements, setting the property has no effect.
See also get_scrollTop
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.