Articles in this section
Category / Section

How to customize font style and backcolor in WinForms TabControlAdv?

2 mins read

Customize the font style and backcolor

In WinForms TabControlAdv, you can customize the Font style and Tab back color by using “Font”, “ActiveTabColor” and “InactiveTabColor” properties. The following code example demonstrates the same.

C#

private void button1_Click(object sender, EventArgs e)
{
   // Changing the document tab background color
   if(colorDialog1.ShowDialog() != DialogResult.Cancel)
   {
     tabControlAdv1.ActiveTabColor = colorDialog1.Color;
   }
}
private void button2_Click(object sender, EventArgs e)
{
   // Changing the document tab Font.
   if(fontDialog1.ShowDialog() != DialogResult.Cancel)
   {
     tabControlAdv1.Font = fontDialog1.Font;
   }
}
private void button3_Click(object sender, EventArgs e)
{
   // Changing the document tab background color
   if(colorDialog1.ShowDialog() != DialogResult.Cancel)
   {
     tabControlAdv1.InactiveTabColor = colorDialog1.Color;
   }
}

VB

Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
   'Changing the document tab background color
   If colorDialog1.ShowDialog() <> System.Windows.Forms.DialogResult.Cancel Then
     tabControlAdv1.ActiveTabColor = colorDialog1.Color
   End If
End Sub
Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button2.Click
   'Changing the document tab Font.
   If fontDialog1.ShowDialog() <> System.Windows.Forms.DialogResult.Cancel Then
     tabControlAdv1.Font = fontDialog1.Font
   End If
End Sub
Private Sub button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button3.Click
   'Changing the document tab background color
   If colorDialog1.ShowDialog() <> System.Windows.Forms.DialogResult.Cancel Then
     tabControlAdv1.InactiveTabColor = colorDialog1.Color
   End If
End Sub

The following screenshot illustrates the Tab customization in TabControlAdv.

Customize the tab in TabControlAdv

Figure 1: Tab customization in TabControlAdv

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/TabControl_Customization1736827167.zip

 

 

Conclusion

I hope you enjoyed learning about how to customize the font style and backcolor in WinForms TabControlAdv.

You can refer to our  WinForms TabControl’s feature tour page to know about its other groundbreaking feature representations. You can also explore our  WinForms TabControlAdv documentation to understand how to present and manipulate data. 

For current customers, you can check out our WinForms from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms TabControlAdv and other WinForms components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

 

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