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

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

# RadioButtonEventArgs.RadioButton

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

## RadioButton

Gets the radiobutton data.

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

- CLI: Never raised in the CLI: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked).
- Cloud: Never raised in the cloud: the events that pass it never fire there (RadioButton.Checked, RadioButton.Click, RadioButton.Unchecked).

C#:

```csharp
public RadioButton RadioButton {get;}
```

Python:

```python
radioButtonEventArgs.RadioButton: RadioButton
```

### Returns

`RadioButton` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var buyRadioButton = new RadioButton { Text = "Buy", GroupName = "direction" };
    buyRadioButton.Checked += OnRadioButtonChecked;
    Chart.AddControl(buyRadioButton);
}

private void OnRadioButtonChecked(RadioButtonEventArgs args)
{
    Print("Direction selected: {0}, checked: {1}", args.RadioButton.Text, args.RadioButton.IsChecked);
}
```

Python:

```python
def on_start(self):
    buyRadioButton = RadioButton()
    buyRadioButton.Text = "Buy"
    buyRadioButton.GroupName = "direction"
    buyRadioButton.Checked += self.on_radio_button_checked
    api.Chart.AddControl(buyRadioButton)

def on_radio_button_checked(self, args):
    api.Print(f"Direction selected: {args.RadioButton.Text}, checked: {args.RadioButton.IsChecked}")
```

