# VisColorPaletteDropDown

Namespace: **PPJ.Runtime.Vis**

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

Non-editable combo-box with drop-down color palette

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

```csharp
public class VisColorPaletteDropDown : VisDropDownBase
```

{% endtab %}

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

```visual-basic
Public Class VisColorPaletteDropDown
    Inherits VisDropDownBase
```

{% endtab %}
{% endtabs %}

## Constructors

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

Default Constructor.

## Properties

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

[IList](https://docs.microsoft.com/en-us/dotnet/api/system.collections.ilist): Returns the collection of colors.

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

[Color](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.color): Returns the selected color.

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

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Returns/Sets the index of the selected color.

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

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Disabled text property.

## 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.viscolorpalettedropdown.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |

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

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

Clears all menus from list.

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.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.viscolorpalettedropdown.md) |             |

**Returns:** [VisColorPaletteDropDown](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md).

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

Retrieves the specified color from the palette.

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

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

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

Retrieves all colors from main palette region.

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

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

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

Retrieves the position of highlight.

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

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

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

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

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

Retrieves all menu entries in list.

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

**Returns:** [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.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.viscolorpalettedropdown.md) |             |
| **szText** | [SalString](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |

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

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

Removes menu entry from list.

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

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.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.viscolorpalettedropdown.md) |             |
| **nColor** | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |

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

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

Assigns all colors to main palette region.

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

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

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

Assigns the position of highlight.

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

**Returns:** [SalBoolean](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.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.viscolorpalettedropdown.md) |             |
| **szText** | [SalString](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |
| **nID**    | [SalNumber](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |

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

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

Assigns all menu entries in list.

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

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

## Implements

| Name                                                                                       | Description |
| ------------------------------------------------------------------------------------------ | ----------- |
| [ISalControl](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md)     |             |
| [ISalEditControl](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |
| [ISalListControl](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.md) |             |
| [ISalWindow](/ppj.runtime.vis.49/controls/ppj.runtime.vis.viscolorpalettedropdown.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.viscolorpalettedropdown.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.
