4D v16.3Memorization of window geometry |
||||||||||||||||||
|
4D v16.3
Memorization of window geometry
|
Object | Saved value |
Radio button | Value of associated variable (1, 0, True or False for buttons according to their type) |
3D radio button | Value of associated variable (0, 1) |
Check box | Value of associated variable (0, 1, 2) |
3D check box | Value of associated variable (0, 1) |
Tabs | Number of selected tab |
Pop-up/Drop-down list | Number of selected row |
Picture pop-up menu | Number of selected row |
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.
When the form is opened again, the objects retain their new look:
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:
Product: 4D
Theme: Properties for active objects
4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)