CheckBox.IsChecked
property · CheckBox · cAlgo.API
DesktopCLICloud
Gets or sets a value indicating whether the checkbox is 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 bool? IsChecked {get; set;}
checkBox.IsChecked: bool | None
Returns bool?
Examples
var checkBox = new CheckBox { Text = "Close positions on stop" };
checkBox.Click += args => Print("Checked: {0}", args.CheckBox.IsChecked == true);
Chart.AddControl(checkBox);
checkBox = CheckBox()
checkBox.Text = "Close positions on stop"
checkBox.Click += lambda args: api.Print(f"Checked: {args.CheckBox.IsChecked == True}")
api.Chart.AddControl(checkBox)