# Visual Class Assignment

> Source: https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/visual-class-assignment

You can assign **[Visual Classes](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes)** to controls at the ***library*** level by using the **Visual Class Assignment** utility. When a library is opened, invoking this utility displays a window that lists the panel controls that may be assigned to a Visual Class once a panel is selected. You can assign one Visual Class at a time to one or multiple controls, providing that the selected controls are the same *control type* defined for that Visual Class.

To invoke this utility, first open an existing library. Then, in **[Library Object Selection](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/library-object-selection/overview)**, select *Utilities > Visual Class Assignment* from the menu bar.

![](https://manual.pvxplus.com/migration-assets/b7e8eacc1810818a2cc06095934535f738a7e9de8e6c917c8bc277172095a5fe.jpg)

This window consists of the following:

|  |  |
| --- | --- |
| *Library* | Pathname of the current library. To specify a different library, select from the drop-down list of the most recently accessed libraries (up to nine) or use the Query button. |
| *Panel* | Select from the drop-down list of panels in the selected library. |
| **Class Name** | Name of the Visual Class to be assigned (either *Fixed* value or string *Expression*). ***A Class Name must be entered.***<br>Select from the drop-down list of all Visual Class Names or enter an existing Class Name. If the *Class Name* entered has not been previously defined, you are given an option to use it and apply it to the selected controls; however, you will need to define its properties using the **[Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes#vcutility)** utility. |
| **Controls To Be Assigned** | ***(Available when a Class Name is entered/selected)***<br>Displays a list of the controls on the selected panel to which a Visual Class can be applied or has already been applied.<br>If the specified *Class Name* was previously applied to any of the panel controls, those controls are displayed separately in the **Controls Assigned To Class** list (see below) to distinguish them from the other controls.<br>Panel controls that cannot be assigned to a Visual Class (i.e. Images, Shapes, External Controls) are not listed.<br>Note:  <br>Visual Classes can be applied only to *specific control types*: Button, Chart, Check Box, Drop Box, Folder, Fonted Text, Frame, Grid, List_Box, Multi-Line, Radio Button, Tristate Box, Variable Drop Box and Variable List Box. See [Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes#vcutility) utility.<br>The **Controls To Be Assigned** list displays the following information:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Object Name* \| Name of the control \|<br>\| *Control Type* \| Type of control (i.e. Button, Dropbox, Grid, Multi-Line) \|<br>\| *Text* \| Text entered for the control, if applicable (i.e. button text, drop box list values) \|<br>\| *Visual Class* \| Name of the Visual Class previously assigned to the control, if applicable \| |
| **Controls Assigned To Class** | ***(Available when a Class Name is entered/selected)***<br>Displays a list of the controls on the selected panel to which the specified *Class Name* was previously assigned.<br>In addition, any controls that you select in the **Controls To Be Assigned** list to be assigned to the specified *Class Name* are added to this list box.<br>For the steps on applying a Visual Class to one or multiple controls, see **[Applying a Visual Class](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/visual-class-assignment)** below.<br>The **Controls Assigned To Class** list displays the following information:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Object Name* \| Name of the control \|<br>\| *Control Type* \| Type of control (i.e. Button, Dropbox, Grid, Multi-Line) \|<br>\| *Text* \| Text entered for the control, if applicable (i.e. button text, drop box list values) \|<br>\| *Visual Class* \| Name of the Visual Class previously assigned to the control, if applicable \| |
| *Assign* | Moves a selected control from the **Controls To Be Assigned** list to the **Controls Assigned To Class** list in preparation for the Apply process. See **[Applying a Visual Class](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/visual-class-assignment)** below. |
| *Remove* | Removes a selected control from the **Controls Assigned To Class** list and returns it to the **Controls To Be Assigned** list, at the same time removing any previously assigned Visual Class for this control. |
| *Ok* | Applies the selected Visual Class Name to controls in the **Controls Assigned To Class** list and closes the **Visual Class Assignment** window. |
| *Cancel* | Cancels any changes and closes the **Visual Class Assignment** window. |
| *Apply* | Applies the selected Visual Class Name to controls in the **Controls Assigned To Class** list and keeps the **Visual Class Assignment** window open for any additional selections. |

## Applying a Visual Class

The steps below guide you through the process of applying a Visual Class using this utility:

| **Step** | **Description** |
| --- | --- |
| 1\. | Select the *Library* and *Panel* with the controls that you will be assigning to a Visual Class. |
| 2\. | Select the Visual *Class Name*. |
| 3\. | Select the control(s) in the **Controls To Be Assigned** list that you want to assign to this Visual Class.<br>Note:  <br>Select controls that match the control type defined for the Visual Class; otherwise, the Visual Class will have no effect on the control.<br>Use any of the methods below to select the control(s). Your selections are automatically added to the **Controls Assigned To Class** list in preparation for the Apply process.<br>- Select a single control and click the *Assign* button.<br>- Select multiple controls by using **Shift-Click** (*consecutive* selections) or **Ctrl-Click** (*random* selections) and click the *Assign* button.<br>- Double click on a single control to automatically add it to the **Controls Assigned To Class** list.<br>- Drag and drop selected controls to the **Controls Assigned To Class** list. |
| 4\. | ***(Optional)*** If you want to remove a control (and its previous Visual Class) from the **Controls Assigned To Class** list (i.e. due to an error), select the control and click the *Remove* button. This returns the control to the **Controls To Be Assigned** list. You can also double click on the control, or use the drag and drop method. |
| 5\. | When you have made your selections, click *Apply* or *Ok*.<br>The Visual Class is then applied to the selected controls, the **Controls Assigned To Class** list is blank, and the **Controls To Be Assigned** list is updated with these changes.<br>Note:  <br>Only one Visual Class can be assigned to a control. If a Visual Class has been previously assigned to a control, it is overwritten when the selected Visual Class is applied. |

The **Visual Class Assignment** utility can also be used to assign Visual Classes to controls at the ***panel*** level but for the ***current panel only***. See **[Visual Class Assignment (Panel Level)](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/options-and-utilities/visual-class-assignment-panel-level)**.

To learn about creating and assigning Themes, see **[Themes](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes)**.

## See Also

**[Library Bulk Edit and Search Utility](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/library-bulk-edit)  
[Panel Bulk Edit Utility](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/options-and-utilities/bulk-edit-utility)**
