Articles in this section

How to add tabPage to tabControAdv while using WinForms TabbedMDIManager and access that tabPage?

Handle TabControlAdded event

Handle the tabControlAdded event to get hold of the tabControl used to display the tabs. Please refer the below code snippet which illustartes this:

C#

private void TabControlAdded(object sender, TabbedMDITabControlEventArgs args )
{
   args.TabControl.TabStyle = typeof(TabRenderer2D);
   //Set different colors for forecolor, text color and tab panel color
   args.TabControl.ForeColor = Color.Black;
   args.TabControl.BackColor = Color.Blue;
   args.TabControl.TabPanelBackColor = Color.Indigo;
}

VB

Private Sub TabControlAdded(ByVal sender As Object, ByVal args As TabbedMDITabControlEventArgs)
   args.TabControl.TabStyle = GetType(TabRenderer2D)
   'Set different colors for forecolor, text color and tab panel color
   args.TabControl.ForeColor = Color.Black
   args.TabControl.BackColor = Color.Blue
   args.TabControl.TabPanelBackColor = Color.Indigo
End Sub
Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied