Utils.Rect Property

Applies to TestComplete 14.71, last modified on April 22, 2021

Description

The Utils.Rect property creates and returns a Rect object corresponding to an empty rectangle.

Declaration

Utils.Rect

Read-Only Property A Rect object

Applies To

The property is applied to the following object:

Property Value

A Rect object with zero size and coordinates.

Example

The following example creates a Rect object and sets its coordinates:

JavaScript, JScript

function Test()
{
  var rect = Utils.Rect;

  rect.Top = 50;
  rect.Left = 100;
  rect.Bottom = 120;
  rect.Right = 250;
}

Python

def Test():
  rect = Utils.Rect

  rect.Top = 50
  rect.Left = 100
  rect.Bottom = 120
  rect.Right = 250

VBScript

Sub Test
  Dim rect
  Set rect = Utils.Rect

  rect.Top = 50
  rect.Left = 100
  rect.Bottom = 120
  rect.Right = 250
End Sub

DelphiScript

procedure Test;
var rect;
begin
  rect := Utils.Rect;

  rect.Top := 50;
  rect.Left := 100;
  rect.Bottom := 120;
  rect.Right := 250;
end;

C++Script, C#Script

function Test()
{
  var rect = Utils["Rect"];

  rect["Top"] = 50;
  rect["Left"] = 100;
  rect["Bottom"] = 120;
  rect["Right"] = 250;
}

See Also

Rect Object

Highlight search results