boundingWidth Property

MS Office DHTML, HTML & CSS

boundingWidth Property


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

Syntax

HTMLN/A
Scripting[ iWidth = ] TextRange.boundingWidth

Possible Values

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

The property is read-only with no default value.

Example

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

Sample Code

<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.01 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
HTML N/A
Scripting TextRange

See Also

boundingHeight, boundingLeft, boundingTop

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.