Click to Rate and Give Feedback
Properties
 boundingTop Property
boundingTop Property

Retrieves the distance between the top edge of the rectangle that bounds the TextRange object and the top side of the object that contains the TextRange.

Syntax

[ iTop = ] TextRange.boundingTop

Possible Values

iTopInteger that receives the top coordinate of the bounding rectangle, in pixels.

The property is read-only. The property has no default value.

Remarks

Note  If the the TextRange is inside a textArea object, add the value of the element's scrollTop property to the value of boundingTop.

Example

This example retrieves the value of the boundingTop property for the given text area.

<SCRIPT>
function boundDim(oObject)
{
    var oTextRange = oObject.createTextRange();
    if (oTextRange != null) {
        alert("The bounding top is \n" + 
            oTextRange.boundingTop + oObject.scrollTop);
    }
}
</SCRIPT>
</HEAD>
<BODY>
<TEXTAREA COLS=100 ROWS=2 ID=oTextarea 
    onclick="boundDim(this)"> . . . </TEXTAREA>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this property.

Applies To

TextRange

See Also

boundingHeight, boundingLeft, boundingWidth
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker