Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
How to merge non-MDI toolbars?
posted

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