private void ParentForm_Activated(object sender, EventArgs e) { // if the parent form if (!_columnFilterMenuStrip.Visible) { StudyFilterColumnHeaderCell header = _columnFilterMenuStrip.Tag as StudyFilterColumnHeaderCell; if (header != null) { header.ResetDropDown(); } } }
private void ColumnFilterMenuStrip_Closing(object sender, ToolStripDropDownClosingEventArgs e) { switch (e.CloseReason) { case ToolStripDropDownCloseReason.CloseCalled: break; case ToolStripDropDownCloseReason.AppClicked: case ToolStripDropDownCloseReason.AppFocusChange: case ToolStripDropDownCloseReason.Keyboard: case ToolStripDropDownCloseReason.ItemClicked: default: StudyFilterColumnHeaderCell header = _columnFilterMenuStrip.Tag as StudyFilterColumnHeaderCell; if (header != null) { Platform.Log(LogLevel.Debug, "{0} ColumnFilterMenuStrip_Closing because of {1}", DateTime.Now.TimeOfDay, e.CloseReason); header.ResetDropDown(); } break; } }