Customize the Distance between the Tab and the Control in TabbedMDIManager in Windows Forms TabbedMDI
3 Sep 2020 / 2 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.
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()
MyBase.New()
End Sub
Public Sub New(ByVal container As IContainer)
MyBase.New(container)
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
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page