# Themes

> Source: https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes

Themes and Visual Classes provide the easiest way in **[NOMADS](https://manual.pvxplus.com/nomads-graphical-application/introduction)** and **[iNomads](https://manual.pvxplus.com/inomads/inomads-introduction)** to define and maintain a unified look and feel to panel controls within your application. With the **[Theme Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#themesutil)** and **[Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes#vcutility)** utilities, you can define default settings for various display properties based on a selected control type and then save each definition with a unique name so that they can be applied or modified when needed.

***Themes*** are used to define a set of display properties for ***all controls*** based on the control type (i.e. all "Button" types), which can then be applied at different hierarchical levels that cascade to lower levels. They can be applied system wide, to specific libraries, to specific panels and to iNomads templates. For example, you can define a Theme for all "Button" controls to set the *Background* property to "Light Red". As a result, all Button controls within your application will have a "Light Red" background.

**[Visual Classes](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes)** are used to define a set of display properties for applying to ***specific controls*** on selected panels (i.e. all buttons with text only), thereby ***overriding*** Theme settings. Visual Classes are particularly useful in cases where unique settings are required (i.e. that do not conform to the applied Theme).

Note:  
To take full advantage of NOMADS and the new visual enhancements, 4D mode is required.

Themes can be defined for the following *Control Types*:

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
|  | **[Default](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-dflt)** | **[Drop_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-dropbx)** | **[Grid](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-grid)** | **[Popup_Menu](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-popup)** | **[Shape-Rectangle](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-rectgle)** |
|  | **[Button](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-btn)** | **[Folder](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-fldr)** | **[List_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-listbx)** | **[Radio_Button](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-radio)** | **[Tristate_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-tristate)** |
|  | **[Chart](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-chart)** | **[Fonted_Text](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-text)** | **[Menu_Bar](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-menu)** | **[Shape-Circle](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-circle)** | **[VarDrop_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-vardrop)** |
|  | **[Check_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-checkbx)** | **[Frame](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-frame)** | **[Multi_Line](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-multiln)** | **[Shape-Line](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-line)** | **[VarList_Box](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-varlist)** |

*(The ability to define Themes and Visual Classes for Shapes (Circles, Lines, Rectangles) and Menus was added in PxPlus 2024.)*

To apply a Theme, see **[Applying a Theme to Your Application](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#applyingtheme)**.

In addition, the **[Copy Theme](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/copy-theme)** utility provides the ability to copy Themes and related Visual Classes from one directory to another. This utility can also be used to create new Themes and Visual Classes.

Note:  
See [Query Button Options](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/invoking-a-query#options) for special considerations when displaying query buttons.

## Themes Maintenance Utility

The **Themes Maintenance Utility** is used to define the display properties for creating a Theme. Themes created with this utility are stored in the *providex.dfs* file.

To invoke this utility, use one of the following methods:

| **Location** | **Method** |
| --- | --- |
| From the **[PxPlus IDE Main Launcher](https://manual.pvxplus.com/pxplus-ide/ide-main-launcher)** | Expand the *Graphical Application Builder (NOMADS)* category. Then expand the *Setup* category and select *Themes*. |
| From **[Library Object Selection](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/library-object-selection/console-and-object-list)** | Select *Themes Maintenance* from the **[Utilities](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/library-object-selection/menu-options#utilities)** menu.<br>*(Themes Maintenance was added to the Library Object Selection Utilities menu in PxPlus 2019.)* |
| From the **[NOMADS Session Manager](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/getting-started#sessionmgr)** | From the *Options* menu, select *Themes*. |

The **Themes Maintenance Utility** is displayed below with a sample entry:

![](https://manual.pvxplus.com/migration-assets/e84e1daf6f7badaa3b103c99b90b6fb459f79ed95837b993aa92d07c5a063d80.png)

This window consists of the following:

|  |  |
| --- | --- |
| *Theme* | Name of the Theme. Maximum 30 characters. Create a new name to be associated with current property values.<br>To select an existing Theme to modify, click the Query button *(binoculars)* or use the Browse buttons. If any unsaved changes are detected, you will be prompted to save the changes.<br>Theme names are not case sensitive. This allows a different case to be used when typing the same Theme name to refer to the ***same*** record (providing that the *Control Type* also matches). When an existing Theme is recalled, the name will be in the case that was entered when the Theme was first created.<br>***Example:***<br>Suppose that a Theme named "ButtonRed" exists for Button controls. Other case variations of this name can be entered to refer to the same Theme; e.g. "BUTTONRED", "buttonred" or "BUTTONred".<br>*(Support for case insensitive Theme name was added in PxPlus 2020.)* |
| *Copy Theme Record* | ***(Available when an existing Theme is selected)***<br>Button used to copy settings from an existing Theme/Control Type to a new Theme. Once it is created, ***the new Theme must be saved***, as the Copy process does not do this.<br>*(The Copy Theme button was added in PxPlus 2020.)* |
| *Control Type* | Control type to be associated with the name of the Theme.<br>Click the drop-down arrow for a list of available control types: *Default, Button, Chart, Check_Box, Drop_Box, Folder, Fonted_Text, Frame, Grid, List_Box, Menu_Bar, Multi_Line, Popup_Menu, Radio_Button, Shape-Circle, Shape-Line, Shape-Rectangle, Tristate_Box, VarDrop_Box and VarList_Box*.<br>The control type *Default* is used to set basic overall properties (*Background* and *Foreground* colors, *Font*) for any control types that do not have these properties defined under their own control record in the current Theme.<br>*(The ability to define Themes for Circle, Line and Rectangle shapes was added in PxPlus 2024.)* |
| *Property  <br>Value* | A two-column table that lists a sub-set of the properties normally displayed in the design window for a control type, as well as selected properties that are not available in the design window. The list of properties varies depending on the *Control Type* selected.<br>The properties are grouped into categories (i.e. *Attributes, Colors, Font*, etc.) and sorted alphabetically within each group by default. These categories can be expanded/collapsed by clicking the **+** *(plus)* or **-** *(minus)* button adjacent to the category name. Only the categories that apply to the selected *Control Type* are displayed.<br>The method for entering or displaying property values is dependent on the property type. Some fields are intended for entering free-form values; e.g. for height and width.<br>Drop box style cells are identified by a down arrow button, which indicates that pre-set selections are available.<br>Query style cells are identified by a three-dotted button. These cells are often associated with more than one field, and clicking the button invokes a separate dialog for entering/changing field values. The dialog that is invoked varies depending on the property. Double clicking inside the cell either invokes the same dialog as the dotted button or allows values to be entered directly into the cell.<br>*(The ability to double click inside a Query style cell was added in PxPlus 2023.)* |
| *Write* | Adds/updates the current record. |
| *Delete* | Removes the current record. |
| *Clear* | Clears the current record. |
| *Exit* | Closes the **Themes** window. If any unsaved changes are detected, you will be prompted to save the changes. (Same applies when using the **X** (Close) button.) |

## Applying a Theme to Your Application

Once Themes have been defined, they can be applied at several hierarchical levels within an application. This allows different aspects of your application to be customized with their own unique look and feel.

Applying a Theme does not impact the **[Toolkit Theme](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/system-defaults#Mark4)**, which is the Theme used by the development system, but it does impact the following user facing applications: **[Report Writer](https://manual.pvxplus.com/report-writer/introduction)**, **[Views](https://manual.pvxplus.com/views-system/introduction)**, **[Query](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/overview)** and **[Customizer](https://manual.pvxplus.com/nomads-graphical-application/customizer/overview)**.

This table describes the different hierarchical levels:

| **Level** | **Description** |
| --- | --- |
| *General* | Assign a Theme to the **[%NOMADS'Theme$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#theme)** property at run time to apply a Theme ***system wide***. This can be done in your START_UP program or the **[Maintain NOMADS Environment](https://manual.pvxplus.com/nomads-graphical-application/maintain-nomads-environment)** utility, and is applicable for ***NOMADS and iNomads environments***.<br>Note:  <br>A Theme assigned to the [%NOMADS'ThemeOverride$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#themeoverride) property *overrides* all other Theme settings.  <br>  <br>See [Session Override](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#sessionoverride). |
| *Library* | Assign a Theme in the **[Library Defaults](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/library-defaults)** window (**Font/Color** tab) to apply a Theme to ***all panels in a selected library***.<br>The **[Library Bulk Edit and Search Utility](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/library-bulk-edit)** can also be used to apply a Theme simultaneously to multiple panels either in a single library or in multiple libraries within a specified directory.<br>Note:  <br>Library Themes *override* the General Theme. A Theme assigned to the [%NOMADS'ThemeOverride$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#themeoverride) property *overrides* all other Theme settings.  <br>  <br>See [Session Override](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#sessionoverride).<br>*(Assigning a Theme to a **library** was added in PxPlus 2017.)* |
| *Panel* | Assign a Theme in the **[NOMADS Panel Header](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview)** window (**Font/Color** tab) when creating/editing a panel to apply a Theme to the ***controls on a selected panel***.<br>The **[Library Bulk Edit and Search Utility](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/library-bulk-edit)** can also be used to apply a Theme simultaneously to multiple panels either in a single library or in multiple libraries within a specified directory.<br>Note:  <br>A Panel Theme *overrides* General and Library Themes. A Theme assigned to the [%NOMADS'ThemeOverride$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#themeoverride) property *overrides* all other Theme settings.  <br>  <br>See [Session Override](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#sessionoverride).<br>*(Assigning a Theme to a **panel** was added in PxPlus 2017.)* |
| *iNomads Template* | In the iNomads environment, assign a *Template* Theme from the **[iNomads Setup](https://manual.pvxplus.com/inomads/inomads-setup)** window, which allows access to System Administration Functions such as *Template Settings*. In this window, select the *Options* button to invoke **[Template Configuration Maintenance](https://manual.pvxplus.com/inomads/template-configuration)**. In the **Overrides** tab, enter a Theme in the *Assign a Theme* field.<br>Note:  <br>A Theme assigned to a Template *overrides* the General Theme, as well as any Library and Panel Themes.  <br>  <br>A Theme assigned to the [%NOMADS'ThemeOverride$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#themeoverride) property *overrides* all other Theme settings.  <br>  <br>See [Session Override](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#sessionoverride). |
| *Session Override* | Assign a Theme to the **[%NOMADS'ThemeOverride$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#themeoverride)** property at run time to apply a Theme ***system wide***. This can be done in your START_UP program or the **[Maintain NOMADS Environment](https://manual.pvxplus.com/nomads-graphical-application/maintain-nomads-environment)** utility, and is applicable for ***NOMADS and iNomads environments***.<br>Note:  <br>The %NOMADS'ThemeOverride$ property *overrides* all other Theme settings *except* the [Toolkit Theme](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/system-defaults#Mark4). |

When testing your application within the NOMADS development system, your Theme settings will be used when displaying your application panels.

***Select Application Theme***

When working within the **[NOMADS Session Manager](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/getting-started#sessionmgr)** to develop your application, you can apply an existing Theme at the **[General](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes#general)** level by using the **Select Application Theme** window.

This window is invoked from the **NOMADS Session Manager**, which is launched from the PxPlus Command line by entering **nom**. Then, on the *Options* menu, choose *Select Application Theme*.

![](https://manual.pvxplus.com/migration-assets/57d5bf420ae580f2f9f60264ca57b88828bc55bfe42fe4ad23aed82172325ba7.png)

This window consists of the following:

|  |  |
| --- | --- |
| *Theme* | Click the drop-down arrow to select an existing Theme. |
| *Clear Current Theme* | Select this check box to clear a Theme that is currently in use. This option only clears the Theme but does not delete it. |

## See Also

**[Visual Classes](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes)**  
**[Copy Theme](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/copy-theme)**

## Control state appearance

- [Button states](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-btn#states)
- [Check Box states](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-checkbx#states)
- [Radio Button states](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes-vc-radio#states)
