
This interface provides access to properties and methods that are common to the BODY, BUTTON, CAPTION, DIV, MARQUEE, TABLE, and TEXTAREA elements.
IHTMLTextContainer Methods
| createControlRange | get_scrollHeight | get_scrollWidth |
| put_scrollTop | get_scrollTop | put_scrollLeft |
| get_scrollLeft | put_onscroll | get_onscroll |
HRESULT createControlRange(
IDispatch **range
);
Creates a selection range object for control-based selection rather than text-based selection. If there are currently controls selected in the text container, the control range is initialized with them; otherwise, it is created empty and controls need to be explicitly added to it. This is opposite of the text range, which defaults to the whole text container if there is no selection. This returns an IHTMLControlRange object.
HRESULT get_onscroll(
VARIANT *p
);
Occurs when the scroll box is repositioned. The default action of this event is to scroll.
See also put_onscroll
HRESULT get_scrollHeight(
long *p
);
Retrieves the element's scrolling height, in pixels. This is the distance between the top and bottom edges of the element's visible content. The physical height of the content, including nonvisible content, can be obtained with the IHTMLElement::get_offsetHeight property.
This property is read-only on HTML documents, and read-write on fixed regions.
See also get_scrollWidth
HRESULT get_scrollLeft(
long *p
);
Retrieves the distance, in pixels, between the left edge of the element and the leftmost portion of the element that is currently visible in the window. This is equal to the horizontal distance that the content of the element has been scrolled.
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 scrollWidth if the assigned value is greater than this. The default value is zero.
This property is always zero for elements that do not support scroll bars. For these elements, setting the property has no effect.
See also put_scrollLeft
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.
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
HRESULT get_scrollWidth(
long *p
);
Retrieves the element's scrolling width, in pixels. This is the distance between the left and right edges of the element's visible content.
This property is read-only on HTML documents, and read-write on fixed regions.
See also get_scrollHeight
HRESULT put_onscroll(
VARIANT v
);
Occurs when the scroll box is repositioned. The default action of this event is to scroll.
See also get_onscroll
HRESULT put_scrollLeft(
long v
);
Sets the distance, in pixels, between the left edge of the element and the leftmost portion of the element that is currently visible in the window. This is equal to the horizontal distance that the content of the element has been scrolled.
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 scrollWidth if the assigned value is greater than this. The default value is zero.
This property is always zero for elements that do not support scroll bars. For these elements, setting the property has no effect.
See also get_scrollLeft
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.
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
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.