Does anyone know of any event or sequence of events to be able to handle when a user clicks an item in a ComboBox? Currently the only events that I see being fire from ComboBox within WinForms is SelectedIndexChanged or SelectedValueChanged. The problem with these events is that they are also fired under many other scenerios such as when the user presses up or down arrow (even if the ComboBox is not open).
ComboBox.SelectedIndexChanged += (o, e) => Console.WriteLine("ComboBox_SelectedIndexChanged");
ComboBox.SelectedValueChanged += (o, e) => Console.WriteLine("ComboBox_SelectedValueChanged");
Any thoughts?
If you are asking about when the user clicks an item in the ComboBox to select it, you can use the ComboBox.SelectionChangeCommitted event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With