Size Method

Class

MoveableWin.

Action

Resizes the window.

Syntax

window.Size (iWidth, iHeight)
Variable Description
iWidth The new width of the window, in pixels. INTEGER.
iHeight The new height of the window, in pixels. INTEGER.

Notes

The Size method resizes the window. After resizing the window, Silk Test Classic checks that the new size is correct, and raises the exception E_CANT_SIZE_WINDOW if it is not.

You can set the option OPT_WINDOW_SIZE_TOLERANCE to specify the number of pixels allowed for a tolerance when a resized window does not end at the specified size.

For some windows and GUIs, you cannot always resize the window to the particular size specified. If the ending size is not exactly what was specified and the difference between the expected and actual sizes is greater than the tolerance, Silk Test Classic raises an exception.

Windows

Windows cannot be sized smaller than will fit comfortably with the menubar.

Example

TextEditor.Size (300, 100)