---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun112/31238487/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/Shogun112/pages/31230613)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31237966)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31240130)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31229480)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31236034)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31231109)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31238946)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31239215)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31235184)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31239447)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31240432)