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

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

# RadioButton.Click

Member of [RadioButton](https://help.ctrader.com/ctrader-algo/references/Controls/RadioButton/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<RadioButtonEventArgs> Click;
```

Python:

```python
radioButton.Click += handler  # handler(obj: RadioButtonEventArgs)
```

### Returns

`Action<RadioButtonEventArgs>` — 

### Examples

C#:

```csharp
var radioButton = new RadioButton { Text = "Buy", GroupName = "Direction" };
radioButton.Click += args => Print("{0} clicked", args.RadioButton.Text);
Chart.AddControl(radioButton);
```

Python:

```python
def on_start(self):
    radioButton = RadioButton()
    radioButton.Text = "Buy"
    radioButton.GroupName = "Direction"
    radioButton.Click += self.on_radio_button_click
    api.Chart.AddControl(radioButton)

def on_radio_button_click(self, args):
    api.Print(f"{args.RadioButton.Text} clicked")
```

