SET WINDOW RECT

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 2004 (Modified)


SET WINDOW RECT (left; top; right; bottom{; window})

ParameterTypeDescription
leftNumberGlobal left coordinate of window's contents area
topNumberGlobal top coordinate of window's contents area
rightNumberGlobal right coordinate of window's contents area
bottomNumberGlobal bottom coordinate of window's contents area
windowWinRefWindow reference number, or
Frontmost window of current process, if omitted

Description

The SET WINDOW RECT command changes the global coordinates of the the window whose reference number is passed in window. If the window does not exist, the command does nothing.

If you omit the window parameter, SET WINDOW RECT applies to the frontmost window for the current process.

This command can resize and move the window, depending on the new coordinates passed.

The coordinates must be expressed relative to the top left corner of the contents area of the application window (on Windows) or to the main screen (on Macintosh). The coordinates indicate the rectangle corresponding to the contents area of the window (excluding title bars and borders).

Warning: Be aware that by using this command, you may move a window beyond the limits of the main window (on Windows) or of the screens (on Macintosh). To prevent this, use commands such as Screen width and Screen height to double-check the new coordinates of the window.

This command does not affect form objects. If the window contains a form, the form objects are not moved or resized by the command (regardless of their properties). Only the window is modified. In order to modify a form window while taking the resizing properties and the objects it contains into account, you must use the RESIZE FORM WINDOW command.

Examples

1. See example for the WINDOW LIST command.

2. Given the following window:

After execution of the following line:

   SET WINDOW RECT(100;100;300;300)

The window appears as follows:

See Also

DRAG WINDOW, GET WINDOW RECT, RESIZE FORM WINDOW.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next