CheckBox.Click
event · CheckBox · cAlgo.API
DesktopCLICloud
Occurs when clicked.
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<CheckBoxEventArgs> Click;
checkBox.Click += handler # handler(obj: CheckBoxEventArgs)
Examples
var checkBox = new CheckBox { Text = "Pause trading" };
checkBox.Click += args => Print("Pause trading clicked, checked: {0}", args.CheckBox.IsChecked);
Chart.AddControl(checkBox);
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}")