Solved

How to change .NET TabControl Background Color

Posted on 2004-08-08
4
15,020 Views
Last Modified: 2011-08-18
Hello,

I am developing a .NET windows (not ASP) application.  The form contains a tab control with a number of tab pages.

I want to change the background color of the TAB (not the TabPage).  For example, I can easily change teh background color of the tabpage to blue, but the actual tab (the bit you click on to change tab pages) is still the default grey.  Can you please show me if / how this can be changed.

Thanks!
0
Comment
Question by:quiTech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 250 total points
ID: 11749092
0
 
LVL 7

Assisted Solution

by:dttri
dttri earned 250 total points
ID: 11750141
 Hello,
  I create this function to do what you need (in C#):

private void changeColor(System.Windows.Forms.TabControl control,System.Drawing.Color color)
{
  for(int i=0;i<control.TabCount;i++)
    control.TabPages[i].BackColor=color;
}

To change the color of the tab control, you simply call for example:
changeColor(tabControl1,Color.Blue);

  Tri
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question