# Panel Persistence

> Source: https://manual.pvxplus.com/nomads-graphical-application/panel-designer/resizing-and-persistence/panel-persistence

NOMADS panel persistence makes it possible to save panel size and location information on the termination of a panel and to restore that panel to the same size and location the next time it is created.

Note:  
This applies only to dialogues and query objects. Panel persistence is *not* available via [Test Mode](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/introduction#editmode) in the Panel Designer.

***Activating Panel Persistence***

To enable panel persistence at run time, your application must **CALL** or **PERFORM** the PxPlus program **\*winpnl** or set **%NOMADS'Panel_Info_Prog$="\*winpnl"**. See **[%NOMAD_Panel_Info_Prog$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#panelinfoprog)**. This program saves and retrieves panel information via the data file ***panel.inf*** located in the **\*win** directory. Doing this turns ***On*** panel persistence ***system-wide***.

You may use a program other than **\*winpnl** to store and retrieve panel information. If you choose to write your own program, load the **%NOMAD_Panel_Info_Prog$** variable with the name of the program that will read and write the panel information to a file. The program will be called and must have two entry points: **GET_PANEL_INFO**, which retrieves the stored location and size of the specified panel, and **SAVE_PANEL_INFO**, which stores the location and size of the specified panel to a disk file. Details of the **CALL** syntax and the required arguments can be found by listing **\*winpnl**.

***Suppressing Panel Persistence***

By default, when panel persistence is turned ***On***, it affects all dialogue panels and queries. However, there may be certain instances when the desired location of a panel (or query) is the one that was specified in the *original* panel (or query) definition. In these instances, panel persistence can be overridden. To do this, several methods are available.

Dialogue panels can sometimes be defined with **[Relative](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview#position)** positioning, which causes a panel to be placed in a specific location in relation to the parent panel at run time. For these panels, the preference may be to maintain relative positioning. In these cases, panel persistence can be overridden by setting the **[%NOMADS'RelPnl_Suppress_Persistence](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#relpnlsuppresspersistence)** property. Available settings are:

|  |  |  |
| --- | --- | --- |
|  | **0** | *Panel persistence is not suppressed **(Default)*** |
|  | **1** | *Suppress panel persistence (location & size)* |
|  | **2** | *Suppress location persistence only (panel size persists)* |

For any dialogue panel defined with *Relative*, *Absolute* or *Centered* positioning, persistence can be controlled at the ***panel*** level by setting the *Panel Persistence* attribute in **[Panel Header Properties](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview#panelpersistence)**. Available settings are:

|  |  |
| --- | --- |
|  | *Default* (based on **[%NOMADS'Panel_Info_Prog$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#panelinfoprog)** and **[%NOMADS'RelPnl_Suppress_Persistence](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#relpnlsuppresspersistence)** settings). See **Note** below. |
|  | *Suppress persistence (location & size)* |
|  | *Suppress location persistence only* |

Note:  
The Panel Persistence setting in Panel Header Properties overrides the [%NOMADS'RelPnl_Suppress_Persistence](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#relpnlsuppresspersistence) setting for panels with *Relative* positioning only.

***Suppressing Query Persistence***

Panel persistence can be suppressed for Queries (for **[Query+](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/overview#queryplus)** and **[Classic Query](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/overview#classicquery)**) on a ***system-wide*** basis by setting the **[%NOMADS'Query_Suppress_Persistence](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#querysuppresspersistence)** property. The settings for this property are the same as for the **%NOMADS'RelPnl_Suppress_Persistence** property above:

|  |  |  |
| --- | --- | --- |
|  | **0** | *Do not suppress persistence* (if set) ***(Default)*** |
|  | **1** | *Suppress persistence* (location/size of query will be the original location/size) |
|  | **2** | *Suppress location persistence* (location will be the original location, but size will persist if changed) |

*(Support for suppressing panel and query persistence was added in PxPlus 2019.)*
