---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun110/13075559/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/Shogun110/pages/13075123)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075245)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075291)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075525)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075527)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075561)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075881)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075977)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075979)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075981)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun110/pages/13075983)