Ortho > Documentation > Core - orthoRectangle

Ortho Documentation

Ortho Core JavaScript Classes
  orthoRectangle
   new orthoRectangle(parent, left, top, width, height [, options])
  parent: The parent Ortho object, typically a panel, in which the rectangle will be placed
  left, top: The integer pixel coordinates within the panel that correspond to the TOP LEFT corner of the rectangle
  width, height: The width and height in pixels for the rectangle
  options: A hash of options for this object. These can include the cssClass option which specifies a CSS class to use instead of the default for this object (.orthoRectangle). The options hash is optional.
 
// Place a 100x20 pixel rectangle at coordinate 50,50 in panel 'panel'
var rect0 = new orthoRectangle(panel, 50, 50, 100, 20);

// Place a 100x20 pixel rectangle at 50,100 and use the CSS class 'myclass'
var rect1 = new orthoRectangle(panel, 50, 100, 100, 20, {cssClass: 'myclass'});
   
Click here for Usage Examples of orthoRectangle