Managing Windows

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004 (Modified)


Windows are used to display information to the user. They have three main uses: to enter data, to display data, and to inform the user in messages and dialogs.

There is always at least one window open. Scroll bars are added, when needed, to let the user scroll in a form that is larger than the window. In the User environment, this window displays either the record list (output form) or the data entry screen (input form). In the Custom Menus environment, this window displays a splash screen (a custom graphic).

When you execute a menu command within the Custom Menus process, the splash screen can be replaced with data by commands that display forms. When the commands finish executing, the splash screen is displayed again by default.

You can open various types of custom windows with the Open Window or Open form window commands (see the Window Types section). All windows opened by these commands are referenced through a WinRef expression. A WinRef is the unique ID of each open window. It is a Longint expression. All commands working with custom windows expect a WinRef parameter.

When you no longer need a custom window, you should close it using the CLOSE WINDOW command or by clicking the Control-menu box (Windows) or Close Box (Macintosh), if it exists.

Some commands open their own windows. Commands such as GRAPH TABLE, QR REPORT, and PRINT LABEL open a window that becomes the frontmost window.

If you start a new process and do not open a window at the beginning of the process method, 4D will automatically open a default one as soon as a form is to be displayed.

Side pushers

Starting with version 2004 of 4th Dimension, the right side and bottom of windows have become "pusher" splitters by default. This means that objects found to the right or below the limits of a window on screen are automatically pushed to the right or towards the bottom if the window is enlarged:

This mechanism allows you to manage retractable windows like the Explorer window (see the example of the SET FORM SIZE command).

Note: This does not work with windows that have scrollbars.

Window coordinates and "right-to-left" mode

In window management commands, the window coordinates are determined with respect to a point of origin generally situated at the top left of the window/screen.

However, when the "right-to-left" mode is activated for the application, the coordinates are reversed and the point of origin switches to the top right of the window/screen. Consequently, in this mode the horizontal coordinates used by the following commands must also be reversed:

Open window

Open form window

Open external window

GET WINDOW RECT

SET WINDOW RECT

Find window

Note: For more information about "right-to-left" mode, please refer to the Design Reference manual and to the description of the SET DATABASE PARAMETER command.

See Also

Open form window, Open window, Window Types.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next