Hi,
We dynamically change context-menu contents in BeforeToolDropdown event. The menu has complex structure with sub-menus. Everything work fine until the form is not tabbed to UltraTabbedMdiManager. When the form is tabbed, after closing one of the sub-menus whole context menu is closing too.
What we should do to prevent this? Thanks in advance.
Hello.
Do you have any sample code that you could provide or could yopu give us more details about your application?
Hello,
Yes, we have sample code (find attached). Use case is:
1. After application start you will see main form with two child forms attached to right and left edge of main form. Context menus for both of child forms work well .
2. Then undock one of these child forms and put it inside the main form (i.e. Mdi). Context menu under this docked inside form work well. But the context menu under the form that is still docked at one of the edges is broken.
I'm sorry, but I don't see any difference in the way that the left and right context menus are working. In the video you can see that the context menu is the same for both child windows. When I run the sample application I see the same results. The context menu contains the same number of menu items with the same captions for both child windows regardless if they are docked to the sides of the form or if they are set to take up the remaining space as an MDI child form.
What is the negative behavior that you are referring to?
The contents of menus is OK and that is not what I'm referring to. At the beginning of the video (0:00-0:10) you can see how I open menu. And that is good behaviour. First menu item with subitem opens. When I move the cursor from the first menu item to the second, the submenu is closed, but context menu remains opened.
Bad behaviour begin with context menu of left pane at (0:25-0:30) after I tabed right pane . First menu item with subitem opens. But when I move cursor to the second, the submenu is closed and closes whole context menu without my additional actions. That's what I don't like.
Now I see what you are talking about; please forgive me for not seeing this before and having this take more time than necessary. This looks like a bug and I will forward this on to our Developer Support department so that they can create a case and log it with development so that we can look into it further.
Stanislav,
I will submit this as a development issue. You will receive more information through the support case.
Michael S.
Our developers recommend that you add UserControls to the docked panes rather than Forms. That should resolve the issue of the ContextMenu closing when it should not.