# Javascript: TXTextControl.ActivationState Enumeration

> The current activation state. It can be activated, deactivated or disabled.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.ActivationState Enumeration
- **307 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/activationstate-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/activationstate-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/activationstate-enumeration/llms-full.txt

---

### Description

The current activation state. It can be activated, deactivated or disabled.

### Members

| Member | Description |
|---|---|
| Activated | The control is activated, which means that it has the keyboard input focus. |
| Deactivated | The control is deactivated, which means that it has not the keyboard input focus. |
| Disabled | The control is disabled, which means that it cannot get the keyboard input focus. |

### Examples

The following example uses `TXTextControl.ActivationState.Activated` (the control is activated, which means that it has the keyboard input focus.) in a document-editing workflow.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.setActivationState(
    TXTextControl.ActivationState.Activated,
    function() {
        console.log("set activation state completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [TXTextControl Object](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/llms-full.txt)
- **Next:** [Javascript: TXTextControl.addEventListener Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/addeventlistener-method/llms-full.txt)
