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

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

# CheckBox.Click

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

## Click

Occurs when clicked.

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

Python:

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

### Returns

`Action<CheckBoxEventArgs>` — 

### Examples

C#:

```csharp
var checkBox = new CheckBox { Text = "Pause trading" };
checkBox.Click += args => Print("Pause trading clicked, checked: {0}", args.CheckBox.IsChecked);
Chart.AddControl(checkBox);
```

Python:

```python
def on_start(self):
    checkBox = CheckBox()
    checkBox.Text = "Pause trading"
    checkBox.Click += self.on_check_box_click
    api.Chart.AddControl(checkBox)

def on_check_box_click(self, args):
    api.Print(f"Pause trading clicked, checked: {args.CheckBox.IsChecked}")
```

