GRAPHIC SET CLIENT statement

Purpose | Change the size of a graphic control or graphic window to a specific client area size.
Syntax | GRAPHIC SET CLIENT nWide&, nHigh&
nWide&, nHigh& | Integral numeric expressions which specify the desired size of the client area. Width and height are specified in pixels or dialog units, depending upon the system used when created.

Remarks

Client size may be smaller than overall size, depending on the type of borders used. The client area is the part inside the borders, which varies depending upon the style and exstyle at creation. 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 graphic control or window. 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.

See also | CONTROL GET CLIENT, CONTROL GET SIZE, CONTROL SET CLIENT, CONTROL SET SIZE, GRAPHIC GET CANVAS, GRAPHIC GET CLIENT, GRAPHIC GET SIZE, GRAPHIC SET CLIP, GRAPHIC SET SIZE