boundingWidth property (Internet Explorer)

Switch View :
ScriptFree
boundingWidth property

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

Syntax

JScript

p = object.boundingWidth

Property values

Type: Integer

the width of the bounding rectangle, in pixels.

Examples

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

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/boundingTop.htm


<SCRIPT>
function boundDim(oObject)
{
    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>

See also

TextRange
TextRange Constructor
Reference
boundingHeight
boundingLeft
boundingTop

 

 

Send comments about this topic to Microsoft

Build date: 2/14/2012