---
title: "getControlEnabled"
canonical: "https://help.vicon.com/space/Shogun111/13207916/getControlEnabled"
format: markdown
---
# Description

Returns the enabled status of the user control that is specified by `userControlID`.

A control that is disabled is blocked from user input (mouse and keystrokes). It is also dimmed to indicate a disabled status.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `getControlEnabled userControlID` |

### Arguments

> Macro (scroll-tablelayout)

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `userControlId` | int | yes | ID of user control to get the enabled status for. |

### Flags

None

## Return value

boolean

## Examples

```plaintext
// Get the enabled status of a User Control.
int $windowId;
int $controlId;
boolean $isEnabled;
 
// First create a User Window to place the Control on 
$windowId = `createWindow "MyWindow"`;
// Create a Push Button Control in the window. We will disable it
// after we create it.
$controlId = `createPushButton $windowId -text "Disabled"`;
```


```plaintext
// Disable the control
enableControl $controlId false;
```

```plaintext
// Now get the enabled status. Should be false.
$isEnabled = `getControlEnabled $controlId`;
print $isEnabled;
```

# Additional information

## Related commands

- [enableControl](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13207812)
- [getControlPos](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13207918)
- [getControlText](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13207920)
- [getControlVisibility](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13207922)
- [getFocus](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13207968)
- [setControlAnchor](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208420)
- [setControlPos](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208422)
- [setControlText](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208424)
- [setControlTip](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208426)
- [setFocus](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208442)
- [showControl](https://vicon-help.atlassian.net/wiki/spaces/Shogun111/pages/13208540)