Here is an extended version of the ToolStripContainer which I've called ToolStripManager.
For now it has only three new features, but I am planning one more if I can get them to work.
Features now:
1. ContextMenuStrip on each ToolStripPanel showing a list of each ToolStrip in the ToolStripManager. A checked item indicates the ToolStrip is visible. If you click an item, the corresponding ToolStrip will hide itself.
(Note, screenshot using my Office2007 renderer, which is not included).
2. MenuStrips and ToolStrips properties, allowing you to use the usual Collection Editor form to add/remove or edit the ToolStrips and MenuStrips hosted in the ToolStripManager:
You don't add ToolStrips to the panels directly, as they will then not show up in the ContextMenuStrip.
3. Setting the Renderer property of the ToolStripManager automatically changes the renderer for every panel and Menu/ToolStrip present.
Features I still want to implement:
- Customizable Toolstrips (changing the buttons on them, and their position)
- Undockable ToolStrips
- Possibly more.
For now, you'll have to do with this
Control is attached. Just add it to your project and Build your solution. Then it should show up in the Toolbox. Usage is the same as any other ToolStripContainer, except you add Menu/ToolStrips via the MenuStrips and ToolStrips properties in the designer.
This looks like something that can become very useful.
I'd really love to see the features you'd still like to have implemented. The first I already got working for a big part, but the second would be a huge advantage in several projects I've been working on as well.
I worked on the undocking a tiny bit more today but didn't get anywhere with it. The actual docking and undocking into a new toolwindow form isn't that hard, it's figuring out when to do it that's not working for me. As far as I know there's no events occuring when a toolstrip is dragged off of a panel so I guess my only option is to constantly check for the location relative to any of the panel's location.