Solved

How to change .NET TabControl Background Color

Posted on 2004-08-08
4
15,021 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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?
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Introduction to Processes

691 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