SizeWindow

Description:              This statement changes the visible size of a window on the screen.

Returns:                    Nothing

Usage:                   Script or Steady State

Format:                      SizeWindow(Win, Width, Height[, VirtualWidth, VirtualHeight])

Parameters:             Win     { object value }  { required }  { no default: }

                                                Any expression which gives an object value contained in the window to size.

                                    Width     { numeric }  { required }  { no default: }

                                                Any numeric expression that gives the new width of the window.

                                    Height     { numeric }  { required }  { no default: }

                                                Any numeric expression that gives the new height of the window.

                                    VirtualWidth     { numeric }  { optional }  { no default: }

                                                Any numeric expression that gives the width inside the new window in user coordinates (which may be pixels). If VirtualWidth is larger than the client area specified, a horizontal scroll bar appears.

                                    VirtualHeight     { numeric }  { optional }  { no default: }

                                                Any numeric expression that gives the height inside the new window in user coordinates (which may be pixels). If VirtualHeight is larger than the client area specified, a vertical scroll bar appears.

Comments:               This statement will change the size of the window to the size given. Any objects drawn in the window are not scaled - this resizing simply changes the area displayed. Vertical and horizontal scroll bars will be added to the window's borders so that the entire area can be viewed.

                                    If either VirtualWidth or VirtualHeight are specified, then both must be provided. Attempting to set one without the other will cause the one you set to be ignored.  If these parameters are omitted, the virtual size of the window will be changed to whatever value is in the Width and Height parameters.

Example:

If ZButton(25, 50, 145, 100, "Resize", 1);

[

  SizeWindow(Self(), 300, 500);

]

This will display a button in the upper left corner of the window that when pressed, resizes the window to be 300 pixels wide by 500 pixels high.

See Also:

MoveWindow | WindowOptions