I have a Windows Form application that uses a PopupMenuTool to hold an overflow of MDI button tools when they exceed 20 items in a particular business area. My problem is that the button opens a new MDI child form and currently, the MDI child form opened from the PopupMenuTool is not being activated so that it shows on top. The users have to click that tab in order to see it activated. This is NOT happening if selected directly from the ribbon, only when selected from the PopupMenuTool. Any thoughts on how to resolve this? I've tried directly activating the form in the load event, but doesn't work.
Hello Gaxtell,
I`m not sure that I understand your scenario and I try to reproduce your issue in a small sample, but without success. Could you please take a look at the attached sample and video file and let me know if you think that I misunderstood your scenario. Please feel free to modify this sample to reproduce your issue and revert it back to me. I`ll be glad to research it for you.
Regards
Sorry, I took a closer look at the code and realized that there are popup menu tools and then when they exceed say 3 tools, the additional tools are placed in a ListTool collection and shown in the ribbon as a popup menu tool as "More Reports...". Then when this More Reports popup menu tool is selected, it pulls up a small popup window where the user can select a tool and then the Ok button. From here, the forms are pulled up in the background instead of being selected as shown in your video file. I've attached a screenshot for your review (It only allows me to attach one file, so I combined the screenshots into one). The left shows the first screen with the popup menu, then the top right shows the second screen with the list window tool that is brought up after the popup menu tool is selected, then the bottom right shows the form which is brought up in the background.
Implemented your code in my project and was able to get my solution working as desired. The form is now pulled into focus within the foreground. Thank you very much for your help!
Have you been able to resolve your issue ? Did you have a time to take a look at the new sample. Let me know if you have any questions.
Thanks for your modifications. I was able to reproduce your scenario, but the mentioned behavior is expected, because MoreItems dialog form keep the focus, meanwhile your MdiChildForm is already created and could not me activate.
So if you want to achieve desired behavior, you should make small mdofications into your code and include :
ultraTabbedMdiManager1.TabFromForm(currentMDiChildForm).Activate();
Please take a look at the attached sample where I already implement this approach. Let me know if you have any questions.
Sorry, did not see your sample, only the video before. I have modified it to show how my solution is coded and you can see the issue with the form opening in the background as well. Please let me know if you have any questions.
Could you please try to modify my sample or upload your own sample that reproduce your scenario and issue. I`ll be glad to research it for you. Let me know if you have any questions.