Hello,
when I programatically create a popup menu with several entries, one of them having a submenu item, the following happens:
If I hover with the mouse of the menu entry that has the submenu attached to it, the whole menu is closed if I select another menu entry after the submenu has unfolded.
When I create the same menu in the designer, the menu stays open (as I would expect) until I select an entry. Am I missing anything?
Regards,
Torsten
--- My code
UltraToolbarsManager ultraToolbarsManager1 = new UltraToolbarsManager(new Container()); // Creates the tools PopupMenuTool menu1 = new PopupMenuTool("menu1"); PopupMenuTool submenu1 = new PopupMenuTool("submenu1"); ButtonTool button2 = new ButtonTool("button2"); ButtonTool button3 = new ButtonTool("button3"); ButtonTool button4 = new ButtonTool("button4"); UltraToolbar objMenuBar = new UltraToolbar("menubar"); ultraToolbarsManager1.Toolbars.AddToolbar("menubar"); // Adds them to the tools collection ultraToolbarsManager1.Tools.Add(menu1); ultraToolbarsManager1.Tools.Add(submenu1); ultraToolbarsManager1.Tools.Add(button2); ultraToolbarsManager1.Tools.Add(button3); ultraToolbarsManager1.Tools.Add(button4); // Sets the caption for each tool that will be displayed in the menu menu1.SharedProps.Caption = "Menu1"; submenu1.SharedProps.Caption = "Submenu1"; button2.SharedProps.Caption = "button2"; button3.SharedProps.Caption = "button3"; button4.SharedProps.Caption = "button4"; // Adds the tools to the menu menu1.Tools.AddTool("submenu1"); menu1.Tools.AddTool("button2"); menu1.Tools.AddTool("button3"); // Adds a tool the menu tool that will be a submenu submenu1.Tools.AddTool("button4"); // this.Adds the menu tool to the menubar ultraToolbarsManager1.Toolbars["menubar"].Tools.AddTool("menu1"); ultraToolbarsManager1.SetContextMenuUltra(this, "menu1");
Torsten,
The code looks correct. What version of NetAdvantage for Windows Forms are you using?
~Kim~
Hi Kim,
I currently use version 9.1.20091.2023. I will try it with 2029 too, I just saw that there is an update