---
title: "getNumListViewColumns"
canonical: "https://help.vicon.com/space/Shogun17/13536641/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/Shogun17/pages/13537671)
- [createListView](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537621)
- [deleteAllListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536445)
- [getListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536613)
- [getListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536611)
- [getNumListViewItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536639)
- [selectListViewItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537214)
- [setListViewColumns](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537156)
- [setListViewHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537154)
- [setListViewItemCheck](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537168)
- [setListViewItemText](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537166)