4D v16.3

Managing Windows

Home

 
4D v16.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 (compatibility) 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 are “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
_o_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 (compatibility)

 
PROPERTIES 

Product: 4D
Theme: Windows

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)