I have a dynamically created popup menu (using it as a context menu - right click). For the most part it works fine. I have a few popup menus within it (dynamically added), which I can navigate through just fine. But, under certain circumstances, the menu will dissapear, even though the mouse is still over the menu.
If I:
1) Right click (brings up the context menu).
2) Move the mouse over one of the context menu options.
3) Hold the mouse still for a few seconds.
4) Move the mouse onto another menu option (Not a subitem of the current menu item - that will work fine).
5) context menu disappears.
Is there some setting I can use to stop this?
Thanks.
Okay, so now I feel like a dork. This is not an issue. I should have experimented more, before I posted. The above code snippet will work, just if you are dynamically creating a context menu in a grid or similar control, you have to define the grid control as the docking container. See snippet below.
CMToolbarsManager.DockWithinContainer = ultraGrid1;CMToolbarsManager.ShowPopup("ROOT", (Control)sender, ((Control)sender).PointToScreen(Location));
I tried the DockWithinContainer and it does not help with the disappearing context menu. Again ours is dynamically built. Below is the code to popup the menu and then set the dockwithin. If I put the dockwithin before the .ShowPopup, the menu never displays.
CMToolbarsManager.ShowPopup("ROOT", (Control)sender, ((Control)sender).PointToScreen(Location));CMToolbarsManager.DockWithinContainer = this;
We are on 2010.3 and it is being used in the UltraGridControl. Any help will be appreciated.
I have had exactly the same problem. And I was happy to have it solved with a single line of code:
this.ultraToolbarsManager1.DockWithinContainer = this;
But now I am facing the same problem again: I use the UltraToolbarsManager on a UltraWinGrid.UltraGrid derived class for a context menu. And now that grid is hosted in a WindowsFormsHost on a WPF Window.
I Use NetAdvantage 2010.3
Is there a known solution to that case?
I got an answer from support (in case anyone else is having this problem)
Adding the line:
toolbarManager.DockWithinContainer = this;
Is all that was required.
This is still a problem (my fault - for some reason I didnt notice you had replied so I let this thread die).
The only ultraToolbarsManager event I'm handling is the ToolClick event.
When you tried to re-produce this, did you dynamically create the menu, or create it statically beforehand?
--- EDIT ---
Just to clarify - I have created a new sample app (to prove this to myself), and it seems that the behaviour is a little different between design time setup popup menus and run time setup popup menu's. The ones generated at run time have the problem I'm describing.
I have submitted this to support, but I'm not sure if they will help me - my support has expired between when I originally posted this and now.