4D v14.3Memorization of window geometry |
||||||||||||||||||
|
4D v14.3
Memorization of window geometry
Memorization of window geometry
4D includes automatic features that save the specific appearance of windows when they are closed (their "geometry"), allowing users to find their working environment in the same state that they left it. These automatic features concern the window coordinates and the position of the different objects it contains, as well as the current state of certain objects such as Tab Controls. Note: The automatic features are only supported if forms are reopened with the same size they had when they were closed. Consequently, they are based primarily on the use of the Open form window command with the * parameter. To enable the automatic memorization mechanism, you must check the Save Geometry option found in the Form properties: When this option is checked, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session:
Note: This option does not take into account objects generated using the OBJECT DUPLICATE command. In order for a user to recover their environment when using this command, the developer must repeat the sequence of creation, definition and positioning of the objects. When this option is checked, the Save Value option is also available for some objects (see below). The Save Value option is found in the "Objects" theme of the Property List: This option is available when:
Here is the list of objects whose "value" can be saved:
4D keeps the coordinates of windows when they are closed as well as their maximized state under Windows when they were generated using the Open form window (formName; *) statement. This information, as well as that which can be saved optionally (geometry and value) is saved in json format in the current user folder of the machine, when the window is closed. Thanks to this, even when the "Default user" account is used, each user that connects with their own machine can keep their own environment. This information is then only used if the form is reopened with the same dimensions and when closing. This means that either the Open form window(*) statement was used, or that the developer has set up a custom system for saving coordinates. The information saved is restored and reapplied in the following order:
The properties of subform objects are saved and automatically reapplied in the same manner. Warning: Information saved using the "Save Geometry" and "Save Value" options is reset whenever the objects of a form are modified in Design mode (resized, moved, added, deleted or renamed). Consequently, we strongly recommend that you do NOT use this interface functionality for saving permanent values such as user preferences. You want for the relative positions of the form separators to be saved. In this case, you can just check the Save Geometry option. When the form is opened, it looks like this: The user resizes the window and moves the separators. The objects are resized according to their own properties. Then the user closes the window. In a form, you have placed one or more expandable areas managed using 3D check boxes. Each check box displays a triangle pointing to the right when the area is collapsed, and pointing downwards when it is expanded. There are several ways to set up these areas (movement or visibility of objects, using different form pages, etc.), and in all cases, the size of the window can vary. In order for the state of the expandable areas to be preserved between two sessions, you must:
In a form, you have put tabs with the "Goto Page" standard action: In this case, for the memorization mechanism to work properly, you must check the Save Geometry option for the form and the Save Value option for the tab object: |
PROPERTIES
Product: 4D ARTICLE USAGE
4D Design Reference ( 4D v14 R2) |
||||||||||||||||