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

---

# Description

A DropDownListBox control combines the features of a VerticalScrollListBox and a single line selected item.   
A control of VerticalScrollListBox appears by clicking the particular line of the selected item. Then, you can choose another VerticalScrollListBox item. The VerticalScrollListBox enables you to display a list of items to the user that the user can select by click. By scrolling, you can reach other items in the list. VisibleLines are displayed in the bar.

![image](media://0fd1bbba-ee2c-4e4c-9829-d370877e6cf6)

## Properties

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

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Appearance |
| ArrowColor | Long | Any | _COLOR_BLACK | Color of arrow |
| ShowArrow | Boolean | Yes, No | No | Flag showing if arrow to expand the list is displayed or not. |
| Border |
| BorderColor | Long | Any | _COLOR_WHITE | Color of Border |
| BorderWeight | Long | Any positive | 1 | Weight of Border |

# Functions

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

## ShowListBox

This function show VerticalScrollListBox.

#### Syntax

```visualbasic
Function ShowListBox()
```

## HideListBox

This function hide VerticalScrollListBox.

#### Syntax

```visualbasic
Function HideListBox()
```

## AddItem

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

#### Syntax

```visualbasic
Function AddItem(itemtext As Text) As Boolean
```

## RemoveAllItems

This function remove all item of the list.

#### Syntax

```visualbasic
Function RemoveAllItems()
```

## SetBorderColor

This function sets a newbordercolor to BorderColor. This function returns true.

#### Syntax

```visualbasic
Function SetBorderColor(newbordercolor As Long) As Boolean
```

## GetBorderColor

This function returns BorderColor.

#### Syntax

```visualbasic
Function GetBorderColor() As Long
```

## SetBorderWeight

This function sets a newborderweight to BorderWeight. The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetBorderWeight(newborderweight As Long) As Boolean
```

## GetBorderWeight

This function returns BorderWeight.

#### Syntax

```visualbasic
Function GetBorderWeight() As Long
```

## SetShowArrow

This function sets a newshowarrow to ShowArrow. This function returns true.

#### Syntax

```visualbasic
Function SetShowArrow(newshowarrow As Boolean) As Boolean
```

## GetShowArrow

This function returns ShowArrow.

#### Syntax

```visualbasic
Function GetShowArrow() As Boolean
```

## SetArrowColor

This function sets a newarrowcolor to ArrowColor. This function returns true.

#### Syntax

```visualbasic
Function SetArrowColor(newarrowcolor As Long)As Boolean
```

## GetArrowColor

This function returns ArrowColor.

#### Syntax

```visualbasic
Function GetArrowColor()As Boolean
```

# Events

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

# Example

If you want to insert items with text to DropDownListBox, use the function AddItem().

If you want to change items of DropDownListBox, use function RemoveAllItems() and then you can insert items using function AddItem() again.

> ℹ️ `Function SetDropDownListBox()`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("BBC America")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("FOX news")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("CNN")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("NBC")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("CNBC world")`  
> ℹ️ `End Function`

> ℹ️ `Function ChangeDropDownListBox()`  
> ℹ️ ` Page1.DropDownListBox1.RemoveAllItems()`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("CNBC world")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("NBC")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("CNN")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("FOX news")`  
> ℹ️ ` Page1.DropDownListBox1.AddItem("BBC America")`  
> ℹ️ `End Function`