See http://www.codeproject.com/cs/menu/ToolBarDock.asp
Version 1.0 - Rog�rio Paulo
Base version - see CodeProject article
Version 2.0 - Martin M�ller (aka mav.northwind)
All changes marked with a comment (// Added by mav).
- ToolBarManager c'tor now takes a ScrollableControl and a Form so that you can define an independent docking region and do not always have to use the form. The form itself is still needed as owner of floating toolbars, though.
- ToolBarManager.AddControl() now returns the newly added ToolBarDockHolder, so that it's properties can be modified.
- ToolBarDockHolder now has a new property ToolbarTitle, allowing you to specify an independent name for a floating toolbar. The default is still the control's Text, but the Control.TextChanged event will no longer modify the title.
- ToolBarDockHolder now has a new property AllowedBorders where you can specify which borders the toolbar is allowed to dock to. I saw that by holding Ctrl you can keep a toolbar from docking, so this made the process of restraining docking capabilities to certain borders only vey simple!
- When building the context menu I've optimized the sorting of the toolbars a bit
- The example now includes a MainMenu to show how the framework behaves in this context and added a View>Toolbars menu where the toolbars can be shown or hidden, pretty much like what the context menu does.
- Modified the size calculation for vertical toolbars with separators, because the last button was clipped. Used but.Rectangle.Width*2, which seems to be quite accurate.
评论0
最新资源