---
title: "getControlEnabled"
canonical: "https://help.vicon.com/space/ShogunPost117/376966295/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

> Macro (scroll-pagebreak)

## 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"`;

// Disable the control
enableControl $controlId false;

// 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/ShogunPost117/pages/376965959)
- [getControlPos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376966301)
- [getControlText](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376966307)
- [getControlVisibility](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376966313)
- [getFocus](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376966457)
- [setControlAnchor](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968101)
- [setControlPos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968107)
- [setControlText](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968113)
- [setControlTip](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968119)
- [setFocus](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968185)
- [showControl](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost117/pages/376968599)