---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun16/13341012/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/Shogun16/pages/13340696)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339956)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339839)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340961)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340970)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341009)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340362)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340017)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340014)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340203)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340200)