Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to change .NET TabControl Background Color

Posted on 2004-08-08
4
Medium Priority
?
15,025 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 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

Independent Software Vendors: 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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

618 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