virtual protected void DropListItems_Closed(object sender, EventArgs e) { OpenMenuContents dropListItems = (OpenMenuContents)sender; dropListItems.Closed -= new EventHandler(DropListItems_Closed); menuIsOpen = false; }
virtual protected void DropListItems_Closed(object sender, ClosedEventArgs e) { OpenMenuContents dropListItems = (OpenMenuContents)sender; dropListItems.Closed -= DropListItems_Closed; IsOpen = false; DropDownContainer = null; }
protected virtual void ShowMenu() { if (this.Parent == null) { throw new Exception("You cannot show the menu on a Menu unless it has a parent (has been added to a GuiWidget)."); } DropDownContainer = new OpenMenuContents(MenuItems, this, OpenOffset, MenuDirection, MenuItemsBackgroundColor, MenuItemsBorderColor, MenuItemsBorderWidth, maxHeight, AlignToRightEdge); DropDownContainer.Closed += DropListItems_Closed; DropDownContainer.Focus(); }
private void ShowMenu() { if (this.Parent == null) { throw new Exception("You cannot show the menu on a Menu unless it has a parent (has been added to a GuiWidegt)."); } OpenMenuContents dropListItems = new OpenMenuContents(MenuItems, this, OpenOffset, menuDirection, MenuItemsBackgroundColor, MenuItemsBorderColor, MenuItemsBorderWidth, maxHeight, AlignToRightEdge); dropListItems.Closed += new EventHandler(DropListItems_Closed); dropListItems.Focus(); }
virtual protected void DropListItems_Closed(object sender, EventArgs e) { OpenMenuContents dropListItems = (OpenMenuContents)sender; dropListItems.Closed -= new EventHandler(DropListItems_Closed); IsOpen = false; DropDownContainer = null; }
protected virtual void ShowMenu() { if (this.Parent == null) { throw new Exception("You cannot show the menu on a Menu unless it has a parent (has been added to a GuiWidegt)."); } DropDownContainer = new OpenMenuContents(MenuItems, this, OpenOffset, MenuDirection, MenuItemsBackgroundColor, MenuItemsBorderColor, MenuItemsBorderWidth, maxHeight, AlignToRightEdge); DropDownContainer.Closed += new EventHandler(DropListItems_Closed); DropDownContainer.Focus(); }
void ShowMenu(object state) { if (this.Parent == null) { throw new Exception("You cannot show the menu on a Menu unless it has a parent (has been added to a GuiWidegt)."); } OpenMenuContents dropListItems = new OpenMenuContents(MenuItems, this, OpenOffset, menuDirection, MenuItemsBackgroundColor, MenuItemsBorderColor, MenuItemsBorderWidth, maxHeight, AlignToRightEdge); dropListItems.Closed += new EventHandler(dropListItems_Closed); dropListItems.Focus(); }