# 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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)VisColorPalette()

## Methods

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)AddMenu(szText, nID)

Adds menu to end of list.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **szText** | [SalString](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**    | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ClearMenu()

Clears all menus from list.

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media)FromHandle(handle)

Returns the control associated with the handle.

| Parameter  | Type                                                                                                               | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| **handle** | [SalWindowHandle](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [VisColorPalette](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetColor(nEntry)

Retrieves color from main palette region.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetColors(nColors)

Retrieves all colors from main palette region.

| Parameter   | Type                                                                                                                    | Description |
| ----------- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
| **nColors** | [SalArray\<SalNumber>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetFocus()

Retrieves the position of highlight.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetMenu(nEntry, sText, nID)

| Parameter  | Type                                                                                                          | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------- | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette)  |             |
| **sText**  | [SalString&](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**    | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetMenuAll(sText, nID)

Retrieves all menu entries in list.

| Parameter | Type                                                                                                                    | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
| **sText** | [SalArray\<SalString>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**   | [SalArray\<SalNumber>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)InsertMenu(nEntry, szText, nID)

Inserts menu entry and shifts list.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **szText** | [SalString](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**    | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)RemoveMenu(nEntry)

Removes menu entry from list.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetColor(nEntry, nColor)

Assigns color to main palette region.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nColor** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetColors(nColors)

Assigns all colors to main palette region.

| Parameter   | Type                                                                                                                    | Description |
| ----------- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
| **nColors** | [SalArray\<SalNumber>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetFocus(nEntry)

Assigns the position of highlight.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetMenu(nEntry, szText, nID)

Assigns menu text and ID.

| Parameter  | Type                                                                                                         | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| **nEntry** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **szText** | [SalString](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**    | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetMenuAll(sText, nID)

Assigns all menu entries in list.

| Parameter | Type                                                                                                                    | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
| **sText** | [SalArray\<SalString>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
| **nID**   | [SalArray\<SalNumber>](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette).

## Implements

| Name                                                                                                          | Description |
| ------------------------------------------------------------------------------------------------------------- | ----------- |
| [ISalWindow](https://desktop-api.iceteagroup.com/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalette) |             |
