Hello,
i have a problem which is very difficult for me to explain. But i will try otherwise this post does not make sense :-)
I have a form with one toolbarsmanager. On this form there are multiple usercontrols with a grid (not infragistics) on it, each containing a own toolbarsmanager.
The tbm on form handles all contextmenus (also for the usercontrols) and the tbm on the usercontrols are for the minitoolbar on the grid. So on normal way everthing works fine. The form tbm shows the contextmenu on the usercontrol by right clicking the mouse (menu is showing on mouseup). And in the mouseup event of the grid the usercontrols tbm show the minitoolbar programmatically. That works fine.
But for our usercontrol/grid we build a fullscreen-function. Therefor we changing the parent of the usercontrol/grid from original form to a temporary fullsized form. And now the problem appears.
When rightclicking on the fullsized grid, the contextmenu is showing on mouse up. And the contextmenu disappears when the minitoolbar is showing. But the contextmenu is not closed it only behid the temporary form. When i disable displaying the minitoolbar the contextmenu will be still visible in front of the grid/tempform. It only disappears because we are showing the minitoolbar.
We are using version 9.1 and unfortunately its necessary to use multiple tbms.
So is it possible to show both, contextmenu and minitoolbar on the temporary form?
Kind regards,
Bjoern
Are you changing the DockWithinContainer property on any of the UltraToolbarsManagers when you show the temporary Form? Are you setting TopMost to True on the temporary Form? Does the application have full trust, or is it a partially trusted application?
Also, can you provide a small sample which reproduces the issue?
Hello Mike,
thank you for the quick response.
We are not changing the DockWithinContainer knowingly and we only set TopMost to the temporary form if the original form of the usercontrol is TopMost too.
Until now we have a workaround. Before opeing the grid in fullsecreen-mode we set the Contextmenu to Nothing and remember the name of the contextmenu. When the fullscreen-mode is closed we bind the contextmenu to the grid again. And on mouseup-event of the grid we are checking for the remembered contextmenuname and if exists we call a ShowPopup manually. Not nice but working...
Ok, I just re-read your original post and I realized something that seems a little odd. Are you trying to display a context menu from one UltraToolbarsManager at the same time as a mini-toolbar from another UltraToolbarsManager? If so, I'm not sure this scenario is supported. You might need to find another approach. One where there is only one UltraToolbarsManager which manages all menus and toolbars.
Ok, if you need to have multiple UltraToolbarsManagers then, I suggest you have the individual UltraToolbarsManagers show the context menus and mini-toolbars like you said. Having different UltraToolbarsManagers display the context menu and mini-toolbar is not supported.
I have to cancel my statement. Not everything is OK. The contextmenu is shown, but when using the keys.apps - key to show a contextmenu nothing happen in fullscreenmode. Thats clear. When we handle the KeyDown of the grid we kan show the contextmenu manually too. But the menu has no focus. Its not possible to use the arrow keys to navigate in the menu. Is it possible to set the focus to the menu like Tbm.Tools(Contextmenu).SetFocus or something like this?
The multiple tbms are grown with our requirements. One tbm on the form is not enough because each grid should show a minitoolbar and it also have a toolbar above the grid where the user can put some tools from the minitoolbar like a Grid-QucikAccessToolbar. And if we use only the form tbm this toolbar is not possible because a toolbar can only be used in the form where the tbm is in. So every grid gets its own tbm to handle these tools. And all of the minitoolbar-tools are only important for the grid they are in. A toolclick on these tools are handled in the grid. Other than the contextmenutools. The toolclick on these tools are mostly handled in the forms.
Now we think about moving the contextmenu tools from form to grids tbm and calling the ownerform instead of handle the toolclick of contextmenu tool in the grid.
Thanky you,