# VisColorPalette

Namespace: **PPJ.Runtime.Vis**

Assembly: **PPJ.Runtime.Vis.49** (4.9.0.0)

Stand-alone color palette

{% tabs %}
{% tab title="C#" %}

```csharp
public class VisColorPalette : VisColorPaletteBase
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class VisColorPalette
    Inherits VisColorPaletteBase
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/dBIrS7XBDGmrzmTRbSI6)VisColorPalette()

## Methods

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AddMenu(szText, nID)

Adds menu to end of list.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **szText** | [SalString](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ClearMenu()

Clears all menus from list.

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/69uzLyEV3ANF4GK6pznb)FromHandle(handle)

Returns the control associated with the handle.

| Parameter  | Type                                                                               | Description |
| ---------- | ---------------------------------------------------------------------------------- | ----------- |
| **handle** | [SalWindowHandle](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [VisColorPalette](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetColor(nEntry)

Retrieves color from main palette region.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetColors(nColors)

Retrieves all colors from main palette region.

| Parameter   | Type                                                                                    | Description |
| ----------- | --------------------------------------------------------------------------------------- | ----------- |
| **nColors** | [SalArray\<SalNumber>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetFocus()

Retrieves the position of highlight.

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetMenu(nEntry, sText, nID)

| Parameter  | Type                                                                          | Description |
| ---------- | ----------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md)  |             |
| **sText**  | [SalString&](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**    | [SalNumber&](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetMenuAll(sText, nID)

Retrieves all menu entries in list.

| Parameter | Type                                                                                    | Description |
| --------- | --------------------------------------------------------------------------------------- | ----------- |
| **sText** | [SalArray\<SalString>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**   | [SalArray\<SalNumber>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)InsertMenu(nEntry, szText, nID)

Inserts menu entry and shifts list.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **szText** | [SalString](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)RemoveMenu(nEntry)

Removes menu entry from list.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetColor(nEntry, nColor)

Assigns color to main palette region.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nColor** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetColors(nColors)

Assigns all colors to main palette region.

| Parameter   | Type                                                                                    | Description |
| ----------- | --------------------------------------------------------------------------------------- | ----------- |
| **nColors** | [SalArray\<SalNumber>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetFocus(nEntry)

Assigns the position of highlight.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetMenu(nEntry, szText, nID)

Assigns menu text and ID.

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **szText** | [SalString](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetMenuAll(sText, nID)

Assigns all menu entries in list.

| Parameter | Type                                                                                    | Description |
| --------- | --------------------------------------------------------------------------------------- | ----------- |
| **sText** | [SalArray\<SalString>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |
| **nID**   | [SalArray\<SalNumber>](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md).

## Implements

| Name                                                                          | Description |
| ----------------------------------------------------------------------------- | ----------- |
| [ISalWindow](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md) |             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
