Change tabbed together window tab size?

Docking/MDI for Windows Forms Forum

Posted 7 years ago by ryan schwoerer
Version: 12.1.0300
Avatar

Is it possible to change the size of the tab at the bottom of each document window, i.e. make much larger?

The tabs I'm talking about are shown here: http://i.imgur.com/5STUM.jpg

 

The code used to set up the DockManger is below.

oDockManager = New ActiproSoftware.UIStudio.Dock.DockManager
oDockManager.DockRenderer = New VisualStudio2005DockRenderer()
oDockManager.HostContainerControl = Me
oDockManager.TabbedMdiContainerTabStripRenderer = New VisualStudio2005DocumentWindowTabStripRenderer()
oDockManager.ToolWindowContainerTabStripRenderer = New VisualStudio2005ToolWindowTabStripRenderer()
oDockManager.DocumentMdiStyle = DocumentMdiStyle.ToolWindowInnerFill

I tried using "TabStripButtonSize" for both the "VisualStudio2005DocumentWindowTabStripRenderer" and "VisualStudio2005ToolWindowTabStripRenderer", however this doesn't appear to work.

oDockManager = New ActiproSoftware.UIStudio.Dock.DockManager
oDockManager.DockRenderer = New VisualStudio2005DockRenderer()
oDockManager.HostContainerControl = Me

Dim tabbedMDIrender As New VisualStudio2005DocumentWindowTabStripRenderer()
tabbedMDIrender.TabStripButtonSize = New Size(200, 60)
oDockManager.TabbedMdiContainerTabStripRenderer = tabbedMDIrender

Dim tabStripRender As New VisualStudio2005ToolWindowTabStripRenderer()
tabStripRender.TabStripButtonSize = New Size(200, 60)
oDockManager.ToolWindowContainerTabStripRenderer = tabStripRender

oDockManager.DocumentMdiStyle = DocumentMdiStyle.ToolWindowInnerFill

 

I'm using UIStudio version 2.0.108.0. Windows 7 (and XP).

[Modified 7 years ago]

Comments (2)

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

Hi Ryan,

All the tab measurement is done in the tab strip renderer's MeasureTabStripTab method.  You could probably create a class that inherits your renderer and override that method.  Then just append on additonal padding to the result from the base method.


Actipro Software Support

Posted 7 years ago by ryan schwoerer
Avatar

Thanks for the help. That actually worked perfectly.

I am completely overriding the default size with a custom size (NewSize)

 

Here's some code that might be of help for future reference...

Public Class CustomDocumentWindowTabStripRenderer
    Inherits ActiproSoftware.UIStudio.TabStrip.VisualStudio2005DocumentWindowTabStripRenderer

    Public Property NewSize As System.Drawing.Size

    Public Overrides Function MeasureTabStripTab(g As System.Drawing.Graphics, tabStripPage As ActiproSoftware.UIStudio.TabStrip.TabStripPage) As System.Drawing.Size
        'Return MyBase.MeasureTabStripTab(g, tabStripPage)
        Return NewSize
    End Function

End Class
The latest build of this product (v2018.1 build 0341) was released 8 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.