Persist the MDI State
You can set the application so that, when the user launches the application, the
sheets are open in the same position and state as when the user closed it.
To persist the states of opened sheets, it is important to associate a meaningful string
ID with each opened sheet. There are two ways to do this:
ID with each opened sheet. There are two ways to do this:
- Set it as an argument when using the OpenSheetAsDocument,
OpenSheetWithParmAsDocument,
OpenSheetDocked,
OpenSheetWithParmDocked,
OpenSheetInTabGroup, or
OpenSheetWithParmInTabGroup function. - Set it using the SetSheetID function.
You can use a function to store the MDI state in the registry when the application
closes. You can then use other functions to load and open the sheets in their docking
states, and present them.
- SetSheetID PowerScript Function
Sets the unique identifier for an open sheet. - SaveDockingState PowerScript function
Stores the MDI state in the registry. - LoadDockingState PowerScript function
Loads two arrays of equal size: type names of persisted sheets and the corresponding IDs. - OpenSheetFromDockingState PowerScript function
Opens one or more persisted sheets within an MDI frame window for dockable windows. - OpenSheetWithParmFromDockingState PowerScript function
Opens one or more persisted sheets within an MDI frame window for dockable windows. OpenSheetWithParmFromDockingState also stores a parameter in the system’s Message object so that it is accessible to the opened sheet. - CommitDocking PowerScript function
After all persisted sheets are opened, this function arranges them and makes them visible.
Parent topic: Dockable Windows
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest