Hi, all -
We are currently building an MDI-based app, and the MDI container's toolbar manager has tools for File menu, Window menu, etc. And then the MDI children add a couple of their own, which are document-specific - Edit menu is a good example.
But then we are loading custom controls into the MDI children, things that the main MDI container will have virtually no knowledge of. (That said, there are a couple of custom events that we use to communicate.) We load them based on application.settings keys and DLLs in the app's folder.
I would like to have available a custom menu (or menus), specific to each custom control. Ideally, the custom DLL would load, and any popup menus or toolbars that are specific to that control would show up in the main app's toolbar, alongside the file/edit/window menus - that is, merge them the way MDI children merge with their parents.
The best I've been able to do is make a floatable toolbar attached to the custom control, but of course it stays.. well.. attached to the control. I can't dock it at the top of the screen.
I had the idea of using a custom event to let the main app know when a control has been created or updated, and hand it the toolbars that I'd like merged in the main window, but it's getting uppity with me and telling me I can't insert the custom control's menus into the main window's toolbarmanager. The nerve...
So - is there any way for me to do this? If you need clarification, I'd be happy to make it happen...
Thanks!Rob Russell
The toolbars manager does not support merging multiple child managers, but you can submit a feature request for this: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
Other than that, you would need to implement this manually. There are a few ways you could do this. You can recreate the menus and tools on the child toolbars manager, then call RefreshMerge() on either the parent or child managers to see those new tools in the merged parent manager. You could also recreate the menus and tools on the parent manager. It sounds like this is what you were trying to do when you were told you couldn't do it though. If you were trying to take the tools which exist in the custom control's manager and add them directly to one of the other managers, this is not supported. Tools can only exist in one manager. However, if you were creating copies, it should have worked. If it didn't, it could be a bug and I would recommend submitting it to the support group: http://es.infragistics.com/gethelp.
Hi, Mike -
I was trying to do it w/out making copies. Can you give me the syntax for that? I've scanned the Tool methods for things like GetCopy or GetClone etc, but came up empty.
My question if we go that route, then, is where do the events for this tool get handled? Can I still handle events from the copied tool in the embedded custom control? Or would I have to trap them in the MDI manager and pass them off somehow?
Rob