Example #1
0
 void DropDown_Closing(object sender, System.Windows.Forms.ToolStripDropDownClosingEventArgs e)
 {
     if (disableClose)
     {
         disableClose = false;
         if (e.CloseReason == System.Windows.Forms.ToolStripDropDownCloseReason.ItemClicked)
         {
             e.Cancel = true;
         }
     }
 }
Example #2
0
 protected override void OnClosing(System.Windows.Forms.ToolStripDropDownClosingEventArgs e)
 {
     this.OwnerItem = null;
     if (this.ChildDropDownControl != null)
     {
         this.ChildDropDownControl.Close();
     }
     if (this.ParentDropDownControl != null)
     {
         this.ParentDropDownControl.ChildDropDownControl = null;
         this.ParentDropDownControl = null;
     }
     base.OnClosing(e);
 }