---
id: "E:cAlgo.API.CheckBox.Checked"
kind: "event"
type: "T:cAlgo.API.CheckBox"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/Checked/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# CheckBox.Checked

Member of [CheckBox](https://help.ctrader.com/ctrader-algo/references/Controls/CheckBox/index.md).

## Checked

Occurs when checked.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public event Action<CheckBoxEventArgs> Checked;
```

Python:

```python
checkBox.Checked += handler  # handler(obj: CheckBoxEventArgs)
```

### Returns

`Action<CheckBoxEventArgs>` — 

### Examples

C#:

```csharp
var checkBox = new CheckBox { Text = "Trailing stop" };
checkBox.Checked += args => Print("Trailing stop enabled");
Chart.AddControl(checkBox);
```

Python:

```python
def on_start(self):
    checkBox = CheckBox()
    checkBox.Text = "Trailing stop"
    checkBox.Checked += self.on_check_box_checked
    api.Chart.AddControl(checkBox)

def on_check_box_checked(self, args):
    api.Print("Trailing stop enabled")
```

