boundingWidth
Summary
Retrieves the width of the rectangle that bounds the TextRange object
Property of dom/TextRangedom/TextRange
Syntax
Note: This property is read-only.
var result = textRange.boundingWidth;
Return Value
Returns an object of type NumberNumber
the width of the bounding rectangle, in pixels.
Examples
This example retrieves the value of the boundingWidth property for the given text area.
<script type="text/html">
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>
Syntax
Attributions
Microsoft Developer Network: [boundingWidth Property Article]