CheckBoxEventArgs.CheckBox
property · CheckBoxEventArgs · cAlgo.API
DesktopCLICloud
Gets the checkbox data.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).
Definition
public CheckBox CheckBox {get;}
checkBoxEventArgs.CheckBox: CheckBox
Returns CheckBox
Examples
protected override void OnStart()
{
var checkBox = new CheckBox { Text = "Show levels" };
checkBox.Click += OnCheckBoxClick;
Chart.AddControl(checkBox);
}
private void OnCheckBoxClick(CheckBoxEventArgs args)
{
if (args.CheckBox.IsChecked == true)
Chart.DrawHorizontalLine("level", Symbol.Bid, Color.Orange);
else
Chart.RemoveObject("level");
}
def on_start(self):
checkBox = CheckBox()
checkBox.Text = "Show levels"
checkBox.Click += self.on_check_box_click
api.Chart.AddControl(checkBox)
def on_check_box_click(self, args):
if args.CheckBox.IsChecked:
api.Chart.DrawHorizontalLine("level", api.Symbol.Bid, Color.Orange)
else:
api.Chart.RemoveObject("level")