RadioButton.Checked
event · RadioButton · cAlgo.API
DesktopCLICloud
Occurs when checked.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public event Action<RadioButtonEventArgs> Checked;
radioButton.Checked += handler # handler(obj: RadioButtonEventArgs)
Examples
var sellRadioButton = new RadioButton { Text = "Sell", GroupName = "Direction" };
sellRadioButton.Checked += args => Print("Direction set to {0}", args.RadioButton.Text);
Chart.AddControl(sellRadioButton);
def on_start(self):
sellRadioButton = RadioButton()
sellRadioButton.Text = "Sell"
sellRadioButton.GroupName = "Direction"
sellRadioButton.Checked += self.on_radio_button_checked
api.Chart.AddControl(sellRadioButton)
def on_radio_button_checked(self, args):
api.Print(f"Direction set to {args.RadioButton.Text}")