Retrieves the width of the rectangle that bounds the TextRange object.
Syntax
HTML N/A Scripting [ iWidth = ] TextRange.boundingWidth
Possible Values
iWidth Integer 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>
Applies To
HTML N/A Scripting TextRange
See Also
boundingHeight, boundingLeft, boundingTop