DADiSP Worksheet Functions > Function Categories > Window Sizing & Layout > SETWSCOORDS

 

SETWSCOORDS

Purpose:

Sets the coordinates of a Worksheet.

Syntax:

SETWSCOORDS(left, top, right, bottom)

left

-

An integer, the left coordinate of the Worksheet area.

top

-

An integer, the top coordinate of the Worksheet area.

right

-

An integer, the right coordinate of the Worksheet area.

bottom

-

An integer, the bottom coordinate of the Worksheet area.

Returns:

An integer, 1 if successful.

Example:

setwscoords(10, 15, 610, 515);

 

Sets the upper left coordinates of the Worksheet to 10 pixels from the left of the Worksheet area border and 15 pixels from the top. The width of the Worksheet is 610 – 10 = 600 pixels and the height is 515 – 15 = 500 pixels.

Example:

setwscoords(0.20, -1, 0.8, -1);

 

Sets the left coordinate to 20% of the Worksheet area and the right coordinate to 80% of the Worksheet area. The top and bottom coordinates not altered.

Remarks:

If 0.0 <= coord <= 1.0, the value is specified in terms of normalized, device independent coordinates, otherwise the values are specified in device (pixel) coordinates. The coordinates are relative to the upper left corner of the Worksheet display area.

 

The normal coordinate system is determined such that 0.0, 0.0 is the upper left corner of the Worksheet area and 1.0, 1.0 is the lower right corner.

 

Because normalized coordinates essentially specify the Worksheet size as a fraction of the Worksheet display area, the relative size of the Worksheet will adjust as the size of the application changes. Use device coordinates to fix the Worksheet to specific size in pixels.

 

A value of –1 preserves the previous value of the coordinate.

 

See SETWSX and SETWSY to separately set the X and Y coordinates of the Worksheet.

See Also:

GETMENUCOORDS

GETWSCOORDS

GETWSXL

GETWSXR

GETWSYB

GETWSYT

SETWSX

SETWSY