Click to return to the Reusing Browser Technology home page    
IHTMLTextAreaElement::sel...     IHTMLTextContainer::creat...     Interfaces and Scripting ...    
Web Workshop  |  Reusing Browser Technology

IHTMLTextContainer Interface


The IHTMLTextContainer interface provides access to properties and methods that are common to the BODY, BUTTON, CAPTION, DIV, MARQUEE, TABLE, and TEXTAREA elements.

IHTMLTextContainer Methods

createControlRange 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.
get_onscroll Occurs when the scroll box is repositioned. The default action of this event is to scroll.
get_scrollHeight 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 method.
get_scrollLeft 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.
get_scrollTop 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.
get_scrollWidth Retrieves the element's scrolling width, in pixels. This is the distance between the left and right edges of the element's visible content.
put_onscroll Occurs when the scroll box is repositioned. The default action of this event is to scroll.
put_scrollLeft 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.
put_scrollTop 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.

Interface Information

Implementation System (Mshtml.dll)
Inherits from IDispatch
Header and IDL files Mshtml.h, Mshtml.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

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.