---
id: "P:cAlgo.API.CheckBoxEventArgs.CheckBox"
kind: "property"
type: "T:cAlgo.API.CheckBoxEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/CheckBoxEventArgs/CheckBox/"
---

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

# CheckBoxEventArgs.CheckBox

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

## CheckBox

Gets the checkbox data.

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

- CLI: Never raised in the CLI: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).
- Cloud: Never raised in the cloud: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).

C#:

```csharp
public CheckBox CheckBox {get;}
```

Python:

```python
checkBoxEventArgs.CheckBox: CheckBox
```

### Returns

`CheckBox` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var checkBox = new CheckBox { Text = "Show levels" };
    checkBox.Click += OnCheckBoxClick;
    Chart.AddControl(checkBox);
}

private void OnCheckBoxClick(CheckBoxEventArgs args)
{
    if (args.CheckBox.IsChecked == true)
        Chart.DrawHorizontalLine("level", Symbol.Bid, Color.Orange);
    else
        Chart.RemoveObject("level");
}
```

Python:

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

def on_check_box_click(self, args):
    if args.CheckBox.IsChecked:
        api.Chart.DrawHorizontalLine("level", api.Symbol.Bid, Color.Orange)
    else:
        api.Chart.RemoveObject("level")
```

