Customize the Distance between the Tab and the Control in TabbedMDIManager in Windows Forms TabbedMDI

29 Apr 20212 minutes to read

The height between the Tab and the Control can be set using the BottomBorderHeight property of the TabHost. This property can be accessed by overriding the TabbedMDIManager as shown in the code snippet.

Customize the distance between the Tab and the Control

public class TabbedMDIManagerExt : TabbedMDIManager


        public TabbedMDIManagerExt() : base(){ }

        public TabbedMDIManagerExt(IContainer container): base(container){}

        protected override TabHost CreateTabHost()


            TabHost tabHost = base.CreateTabHost();

            // Sets the Height in pixels.

            tabHost.BottomBorderHeight = 10;

            tabHost.BottomBorderColor = Color.SlateBlue;

            return tabHost;


        protected override MDITabPanel CreateMDITabPanel()


            MDITabPanel tabPanel = base.CreateMDITabPanel();

            tabPanel.ActiveTabColor = Color.PowderBlue;

            return tabPanel;


Public Class TabbedMDIManagerExt

Inherits TabbedMDIManager

Public Sub New()


End Sub

Public Sub New(ByVal container As IContainer)


End Sub

Protected Overrides Function CreateTabHost() As TabHost

Dim tabHost As TabHost = MyBase.CreateTabHost()

' Sets the Height in pixels.

tabHost.BottomBorderHeight = 10

tabHost.BottomBorderColor = Color.SlateBlue

Return tabHost

End Function

Protected Overrides Function CreateMDITabPanel() As MDITabPanel

Dim tabPanel As MDITabPanel = MyBase.CreateMDITabPanel()

tabPanel.ActiveTabColor = Color.PowderBlue

Return tabPanel

End Function

End Class