4D v14.3

Managing Windows

Home

 
4D v14.3
Managing Windows

Managing Windows  


 

 

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 Design environment, this window displays either the record list (output form) or the data entry screen (input form). In the Application environment, this window displays a splash screen (a custom graphic).

When you execute a menu command within the Application 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.

WinRef  

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 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.

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 FORM SET SIZE command).

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

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.

 
PROPERTIES 

Product: 4D
Theme: Windows

 
SEE ALSO 

Open form window
Open window
Window Types

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : Managing Windows ( 4D v11 SQL Release 6)