GRAPHIC SET SIZE statement  

Purpose

Change the overall size of a graphic control or graphic window.

Syntax

GRAPHIC SET SIZE nWide&, nHigh&

Remarks

Overall size may be larger than client size, depending on the type of borders used.  The client area is the part inside the borders, while overall size includes the borders.  A graphic target with a border will typically have a larger overall size than one without a border.

Beginning with this version of PowerBASIC, GRAPHIC CONTROLS may be resized with CONTROL SET CLIENT, GRAPHIC SET CLIENT, CONTROL SET SIZE, and GRAPHIC SET SIZE.

The original bitmap is copied, pixel for pixel, to the newly resized control.  Any expanded area is filled with the current background color.  Your program draws to it in the normal fashion for a bitmap of the new size.

If a clip area had been established to create margins, it is reset.  If scaled coordinates had been established, they are also reset, as neither would be appropriate for the altered size.  You can enable these attributes again with GRAPHIC SCALE or GRAPHIC SET CLIP, based upon the new size of the drawing area.

nWide&, nHigh&

Integral numeric expressions which specify the desired size of the overall area.  Width and height are specified in pixels or dialog units, depending upon the system used at creation.

See also

CONTROL SET CLIENT, CONTROL SET SIZE, GRAPHIC GET SIZE, GRAPHIC SET CLIENT,