I have an issue similar to http://es.infragistics.com/community/forums/p/4936/267424.aspxexcept that DockWithContainer is not helping here.
I believe the problem is caused by the special way that our application is set up: It's WinForms running inside an MFC window. The reason for this set-up is that the app must be an ActiveDocument server, and we've used MFC to create the ActiveDocument skeleton.
This has caused minor issues in the past, like menus and combobox drop-downs not closing when the app loses its focus, but so far we've been able to live with those. But now we have the problem that once our pop-up menu has shown a submenu and the user moves the mouse to another menu item (so that the submenu should go away), the entire popup disappears. This is a major usability issue.
My favorite approach would be to do without the UltraToolbarsManager, but apparently the PopupMenuTool cannot work without it.
The goal is to create a control, derived from UltraDropDownButton, that displays a drop-down menu. To make it self-contained, it needs to have its own UltraToolbarsManager and dynamically create the menu in the DroppingDown event. I have this working nicely in a small test app, but I'm hitting a wall in our real app.
Any ideas on where to look to make this work?
TIA,Hans
Hell Hans,
Thank you very much for your reply. Let me know if you have any further questions. Have a nice day.
Hi Michael
Thank you for your reply -- sorry for the late answer, I got distracted by other tasks.
I have not actually tried the approach that you suggested.
At some point I realized that we do have a working toolbar with menu and drop-down tools in the application. Actually, we have two toolbars controlled by two UltraToolbarsManagers inside two panels (DockWithContainer) within a container control that is derived from System.Windows.Forms.UserControl. They cannot be moved, resized, etc., so we completely ignore all the docking stuff.
My solution was to add a third UltraToolbarsManager and make it available to all popup menu instances. The popup menus are built dynamically on request (in my overridden UltraDropDownButton.OnDroppingDown()), and since only at most one of them is visible at any time, having a shared but dedicated UltraToolbarsManager works nicely.
The only minor catch was that the UltraToolbarsManager's container panel cannot be hidden. It needs to be visible, but it can have Size.Empty. :-)
Best,Hans
Hello Salvis,
Thank you for reporting this to us. Yes, the UltraToolbarsManager is not working properly because it's being used outside of Windows Forms environment that it was designed for. Please note that I am not all too familiar with MFC but to help resolve the issue I came across another thread of ours that may interest you. Please review the following forum post: <http://es.infragistics.com/community/forums/p/3349/25475.aspx#25475>
This thread discusses a nearly identical situation similar to the one you are currently facing where overrding some protected members on the toolbars manager can help fix the issue you having in an MFC environment.
Please let me know if this helps.