Search DaTutorials:  
HOME
DHTML Reference
Introduction
Reference

boundingWidth Property


Retrieves the width of the rectangle that bounds the TextRange object.

Syntax

[ iWidth = ] TextRange.boundingWidth

Possible Values

iWidthInteger that receives the width of the bounding rectangle, in pixels.

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

Example

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

<SCRIPT>
function boundDim(oObject)
{
    var collTextarea = document.all.tags("TEXTAREA");
    if (collTextarea != null) {
        var oTextRange = oObject.createTextRange();
        if (oTextRange != null) {
            alert("The bounding width is \n" + 
                oTextRange.boundingWidth);
        }
    }
}
</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, boundingTop

     Web Advertising | Online Advertising | Web Advertising | Internet Advertising | Free Advertising
Home    Link To Us    Ad With Us    Contact Us    Tell A Friend    Affiliates    Blog    Stock Photos