GETWSCOORDS

Purpose:

Returns the coordinates or dimensions of the Worksheet.

Syntax:

GETWSCOORDS(devcoord, region)

(width, height) = GETWSCOORDS(devcoord, region)

(left, top, right, bottom) = GETWSCOORDS(devcoord, region)

devcoord

-

Optional. An integer, If 0 (default), return normalized coordinates. If 1, return device (pixel) coordinates.

region

-

Optional. An integer. If 0 (default), return the coordinates of the Worksheet. If 1, return the coordinates of the Worksheet display area.

Returns:

One or more integers, the dimensions or location of the Worksheet or Worksheet display area in normalized or device coordinates.

GETWSCOORDS(devcoord, region) returns the width of the Worksheet or Worksheet display area.

(width, height) = GETWSCOORDS(devcoord, region) returns the width and height of the Worksheet or Worksheet display area.

(left, top, right, bottom) = GETWSCOORDS(devcoord, region) returns the coordinates of the Worksheet or Worksheet display area.

Example:

newworksheet(4, 0);

(l, t, r, b) = getwscoords();

setwscoords(l+0.1, t, r-0.1, b);

 

Creates a new Worksheet of 4 Windows without prompting and returns the normalized coordinates of the Worksheet. The width of the Worksheet is then decreased by 10% on each side.

Example:

newworksheet(4, 0);

(l, t, r, b) = getwscoords(1);

setwscoords(l+100, t, r-100, b);

 

Creates a new Worksheet of 4 Windows without prompting and returns the device coordinates of the Worksheet. The width of the Worksheet is then decreased by 100 pixels on each side.

Remarks:

If devcoord is 1, the returned values are specified in device (pixel) coordinates, otherwise normalized, device independent coordinates between 0.0 and 1.0 are returned. The coordinates of the Worksheet are relative to the upper left corner of the Worksheet display area.

 

If the region parameter is 1, the returned coordinates are for the Worksheet display area, independent of the size of the Worksheet.

 

See GETWSXL and GETWSXR to return the left and right Worksheet coordinates.

 

See GETWSYB and GETWSYT to return the bottom and top Worksheet coordinates.

See Also:

GETMENUCOORDS

GETWSXL

GETWSXR

GETWSYB

GETWSYT

MENUFILE

SETMENUCOORDS

SETWSCOORDS