A
Andrus
I placed Combobox to winforms DataGridView using DataGridViewComboBoxColumn
and other controls.
My combobox class contains code to enable/disable button in form.
OnEnter and OnLeave events fire but button is never grayed out.
How to make button active only if combobox column is active ?
Andrus.
class MyCombo: ComboBox {
protected override void OnEnter(System.EventArgs e) {
((BrowseForm)FindForm()).OpenSelection.Enabled = true;
base.OnEnter(e);
}
protected override void OnLeave(System.EventArgs e) {
((BrowseForm)FindForm()).OpenSelection.Enabled = false ;
base.OnLeave(e);
}
}
and other controls.
My combobox class contains code to enable/disable button in form.
OnEnter and OnLeave events fire but button is never grayed out.
How to make button active only if combobox column is active ?
Andrus.
class MyCombo: ComboBox {
protected override void OnEnter(System.EventArgs e) {
((BrowseForm)FindForm()).OpenSelection.Enabled = true;
base.OnEnter(e);
}
protected override void OnLeave(System.EventArgs e) {
((BrowseForm)FindForm()).OpenSelection.Enabled = false ;
base.OnLeave(e);
}
}