Articles in this section

How to provide an offset to the left of the tabs in WinForms TabControlAdv?

Provide an offset to the left of tabs

In your form’s constructor, after calling the InitializeComponent method, add code like this:

C#

// Provide an offset for the tabs to the left(if aligned top/bottom) or top (if aligned right/left)
// This is possible only in single line mode (Multiline = false).
// Get the single-line tab panel renderer and set this offset on it.
if(this.tabControlAdv1.Renderer is SingleLineTabPanelRenderer)
{
   SingleLineTabPanelRenderer renderer = this.tabControlAdv1.Renderer as SingleLineTabPanelRenderer;
   // Offset by 5 pixels.
   renderer.PadX = 5;
}

VB

' Provide an offset for the tabs to the left(if aligned top/bottom) or top (if aligned right/left)
' This is possible only in single line mode (Multiline = false).
' Get the single-line tab panel renderer and set this offset on it.
If TypeOf Me.tabControlAdv1.Renderer Is SingleLineTabPanelRenderer Then
   Dim renderer As SingleLineTabPanelRenderer = Me.tabControlAdv1.Renderer as SingleLineTabPanelRenderer
   ' Offset by 5 pixels.
   renderer.PadX = 5
End If

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied