---
title: "showControl"
canonical: "https://help.vicon.com/space/Shogun113/84224884/showControl"
format: markdown
---
# Description

Shows or hides the user control that is specified by `userControlID`. All user controls are visible by default, unless created with the `-hidden` option.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `showControl userControlID showBoolean` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `showBoolean` | boolean | yes | Flag to show/hide the user control |
| `userControlId` | int | yes | ID of user control to show/hide. |

### Flags

None

## Return value

boolean 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Show/Hide a control.
int $windowId;
int $controlId;
boolean $wasShowing;
 
// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;
 
// Create a Push Button Control in the window. Create it hidden.
// We will show it later.
$controlId = `createPushButton $windowId -text "Sample" -hidden`;
 
// Show the Control, getting its previous visibility
$wasShowing = `showControl $controlId true`;
print $wasShowing;
```

# Additional information

## Related commands

- [enableControl](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84216254)
- [getControlEnabled](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84220705)
- [getControlPos](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84220715)
- [getControlText](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84216994)
- [getControlVisibility](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84223408)
- [getFocus](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84223786)
- [setControlPos](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84225692)
- [setControlText](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84214482)
- [setControlTip](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84222048)
- [setFocus](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84219051)