?
Solved

How to change .NET TabControl Background Color

Posted on 2004-08-08
4
Medium Priority
?
15,027 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
2 Comments
 
LVL 37

Accepted Solution

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

Assisted Solution

by:dttri
dttri earned 1000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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?
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

840 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