'Declaration
Public ReadOnly Property ComboBoxEditor As ComboBoxEditor
public ComboBoxEditor ComboBoxEditor {get;}
'Declaration
Public ReadOnly Property ComboBoxEditor As ComboBoxEditor
public ComboBoxEditor ComboBoxEditor {get;}
The ComboBoxEditor object can be used to get and set properties on the currently active ComboBox editor without casting the Editor property.
If no editor is active, or if the editor is not a System.Windows.Forms.ComboBox, these properties return null or -1, and cannot be set.
// with the ComboBoxEditor property: Console.WriteLine("The current combo index is {0}", _flex.ComboBoxEditor.SelectedIndex); // without the ComboBoxEditor property: ComboBox cb = _flex.Editor as ComboBox; int index = (cb != null) ? cb.SelectedIndex : -1; Console.WriteLine("The current combo index is {0}", index);