Utils.Size Property

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

The Utils.Size property lets you get an empty Size object, which is intended to represent the width and height of a rectangular area that is not part of anything else.

Declaration

Utils.Size

Read-Only Property A Size object

Applies To

The property is applied to the following object:

Property Value

A Size object that currently does not correspond to any set of the width and height.

Example

The following code snippet demonstrates how to create an empty Size object and specify its properties:

JavaScript, JScript

function Test()
{
  var Size, SetHeight, SetWidth;
  // ...
  // Creates a new Size object
  Size = Utils.Size;
  // Sets the width and height
  Size.Height = SetHeight;
  Size.Width = SetWidth;
  // ...
}

Python

def Test():
  # ...
  # Creates a new Size object
  Size = Utils.Size
  # Sets the width and height
  Size.Height = SetHeight
  Size.Width = SetWidth
  # ...

VBScript

Sub Test
  Dim Size
  ' ...
  ' Creates a new Size object
  Set Size = Utils.Size
  ' Sets the width and height
  Size.Height = SetHeight
  Size.Width = SetWidth
  ' ...
End Sub

DelphiScript

procedure Test();
var Size, SetHeight, SetWidth;
begin
  // ...
  // Creates a new Size object
  Size := Utils.Size;
  // Sets the width and height
  Size.Height := SetHeight;
  Size.Width := SetWidth;
  // ...
end;

C++Script, C#Script

function Test()
{
  var Size, SetHeight, SetWidth;
  // ...
  // Creates a new Size object
  Size = Utils["Size"];
  // Sets the width and height
  Size["Height"] = SetHeight;
  Size["Width"] = SetWidth;
  // ...
}

See Also

Size Object

Highlight search results