---
title: "DropDownListBox2"
canonical: "https://docs.cuesystem.com/space/CVCGC/477102136/DropDownListBox2"
format: markdown
---
> Macro (toc)

---

# Description

DropDownListBox2 differs from DropDownListBox in:

- You can set icons.
- If the list is expanded, when push outside of the object, the item displays a single line selected line and VerticalScrollListBox is hidden.
- When there are fewer items than the VisibleItems, you will see a smaller number of rows when the list is expanded.
- ShowArrow is enabled by default.

# Properties

See [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Properties](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Properties) . In addition this object uses the following properties.

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Icon |
| VerticalIconShift | Long | Any | 0 | Vertical shift of icons in pixels |
| HorizontalIconShift | Long | Any | 0 | Horizontal shift of icons in pixels |

# Functions

See [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Functions](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Functions) . In addition this object uses the following functions.

## AddItem

This function adds a new item to the list and sets text and icon index. Function returns True on success or False if next item index is more than 1000 items or iconindex is more than 50.

#### Syntax

```visualbasic
Function AddItem(itemtext As Text, iconindex As Long)As Boolean
```

## RemoveAllItems

This function remove all item of the list.

#### Syntax

```visualbasic
Function RemoveAllItems()
```

## SetHorizontalIconShift

This function sets a newhorizontalIconshift to HorizontalIconShift. This function returns true.

#### Syntax

```visualbasic
Function SetHorizontalIconShift(newhorizontalIconshift As Long) As Boolean
```

## GetHorizontalIconShift

This function returns HorizontalIconShift.

#### Syntax

```visualbasic
Function GetHorizontalIconShift() As Long
```

## SetVerticalIconShift

This function sets a newverticalIconshift to VerticalIconShift. This function returns true.

#### Syntax

```visualbasic
Function SetVerticalIconShift(newverticalIconshift As Long) As Boolean
```

## GetVerticalIconShift

This function returns VerticalIconShift.

#### Syntax

```visualbasic
Function GetVerticalIconShift() As Long
```

# Events

See [https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Events](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/476872744/DropDownListBox#Events) .