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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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

> Macro (scroll-pagebreak)

## 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/ShogunPost121/pages/1253739268)
- [getControlPos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738647)
- [getControlText](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738043)
- [getControlVisibility](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737201)
- [getFocus](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737500)
- [setControlAnchor](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738871)
- [setControlPos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737132)
- [setControlText](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736614)
- [setControlTip](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253739037)
- [setFocus](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737907)
- [showControl](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736955)