---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun114/196390258/getNumListViewColumns"
format: markdown
---
# Description

Use this command to get the number of columns in a list view user control.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `getNumListViewColumns userControlID` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `userControlID` | integer | yes | ID of the list view to operate on |

### Flags

None

## Return value

integer

Returns the number of columns in the list view

## Examples

```plaintext
// Get the number of columns in a list view we created earlier 
int $listViewID = `getGlobalIntVar "ListViewID"`;
print( `getNumListViewColumns $listViewID` );
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [addListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196383013)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196381708)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196388076)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196391402)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196389451)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196390252)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196391438)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196381684)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196380507)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196382925)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196387249)