Skip to content

ComboBoxSelectedItemChangedEventArgs.ComboBox

property · ComboBoxSelectedItemChangedEventArgs · cAlgo.API

DesktopCLICloud

The ComboBox that it is selected item changed

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ComboBox.SelectedItemChanged).

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ComboBox.SelectedItemChanged).

Definition

public ComboBox ComboBox {get;}
comboBoxSelectedItemChangedEventArgs.ComboBox: ComboBox

Returns ComboBox

Examples

protected override void OnStart()
{
    var comboBox = new ComboBox();
    comboBox.AddItem("Hour");
    comboBox.AddItem("Daily");
    comboBox.SelectedItemChanged += OnComboBoxSelectedItemChanged;
    Chart.AddControl(comboBox);
}

private void OnComboBoxSelectedItemChanged(ComboBoxSelectedItemChangedEventArgs args)
{
    Print("Combo box selected index: {0}", args.ComboBox.SelectedIndex);
}
def on_start(self):
    comboBox = ComboBox()
    comboBox.AddItem("Hour")
    comboBox.AddItem("Daily")
    comboBox.SelectedItemChanged += self.on_combo_box_selected_item_changed
    api.Chart.AddControl(comboBox)

def on_combo_box_selected_item_changed(self, args):
    api.Print(f"Combo box selected index: {args.ComboBox.SelectedIndex}")