---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun19/13796190/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/Shogun19/pages/13795754)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795876)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795922)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796156)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796158)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796192)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796512)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796608)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796610)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796612)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796614)