Solved

How to change .NET TabControl Background Color

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now