boundingHeight property

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

Syntax

JavaScript

p = object.boundingHeight

Property values

Type: Integer

the height of the bounding rectangle, in pixels.

Examples

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


<!DOCTYPE html>

<html>
<head>
  <title>boundingHeight</title>
</head>
<body>
  <textarea cols="100" rows="2" onclick="boundDim(this)"> . . . </textarea>
  <script>
    function boundDim(oObject) {
      var oTextRange = oObject.createTextRange();
      if (oTextRange != null) {
        console.log("The bounding height is " + oTextRange.boundingHeight);
      }
    }
  </script>
</body>
</html>

See also

TextRange
Reference
boundingLeft
boundingTop
boundingWidth

 

 

Show:
© 2014 Microsoft