Can I change InnerSpliters Height?

Docking/MDI for Windows Forms Forum

Posted 9 years ago by Yuji Kinoshita
Version: 12.1.0

Hi, I need to change the height of inner-splitters in TabbedMdiRootContainer. On NewHorizontalTabGroup, I want to change to same heights, and on NewVerticalTabGroup, I want to change to same widths.

1) Does DockManager provide the such a method or a property?

2) Can I fook the event of right click menu OnNewHorizontalTabGroup/OnNewVerticalTabGroup?



Comments (3)

Answer - Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA


1) The IDockRenderer in use has a SplitterExtent property that you can set to control the splitter size.  That should affect all splitters used in the product.

2) The DockManager.WindowContextMenu event fires before a context menu shows.  It includes the default context menu, which you can alter as needed (change items, etc.).

Actipro Software Support

Posted 9 years ago by Yuji Kinoshita

Thank you for your reply. I tried it.

1) Sorry, I mean like a "SplitterDistance" property on WinForms.SplitContainer, Not own size.

2) I did it. thank you!

Would you tell me about (1)?

Posted 9 years ago by Yuji Kinoshita

I figure out. Thank you for your support!

var dm       = this.dockManager;
var root     = dm.TabbedMdiRootContainer;
var splitter = dm.DockRenderer.SplitterExtent;
var count    = root.TabbedMdiContainers.Count;
foreach (TabbedMdiContainer tc in root.TabbedMdiContainers)
    tc.Height = (root.ClientSize.Height - splitter * count) / count;
    // tc.Width = (root.ClientSize.Width - splitter * count) / count; 
The latest build of this product (v22.1.3) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.