Click here to Skip to main content
12,693,891 members (33,488 online)
Click here to Skip to main content
Add your own
alternative version


15 bookmarked

Selected TabPage style in Winform Tab Control

, 16 Feb 2004
Rate this:
Please Sign up or sign in to vote.
In winform application, we can change the selected tab page style using DrawItem event in tabcontrol

Sample Image - SelectedTabPage.jpg


In winform application, TabControl doesn't have any property to change the Font style or Color. But we can change the selected tab page style using DrawItem event in tabcontrol programatically. See the below pictures for different styles.

Style 1:

You can give two color for Tab page in the following way.

bshBack = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds,<BR>Color.LightSkyBlue , Color.LightGreen, <BR>System.Drawing.Drawing2D.LinearGradientMode.BackwardDiagonal);
bshFore = Brushes.Blue;


Style 2:

Here I just change the font bold property.

Sample screenshot

Style 3


In this way, we can apply any color or font to the Tab Controls and Tab Pages.


I think this article will help you to apply the colors and font to a tap pages and any help, comments are much appreciated!


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Amalorpavanathan Yagulasamy(AMAL)
Web Developer
United States United States
Amalorpavanathan Yagulasamy (AMAL) is a Software Engineer for Protech Solution Inc. and has designed and implemented projects for Arkansas Child Support, Arkansas Budgetting, Michigan Child Support , Massachusetts Child Support, National Informatics Center-India and Indian Oil Corporation. His background is in developing relational databases and n-tier applications on Windows platforms in CMM Level Standards. He can be reached at

You may also be interested in...


Comments and Discussions

QuestionHow to change the tabcontrol backcolor? Pin
Mosquito10917-Aug-04 21:58
memberMosquito10917-Aug-04 21:58 
AnswerRe: How to change the tabcontrol backcolor? Pin
Dave Midgley6-Jan-06 7:55
memberDave Midgley6-Jan-06 7:55 
GeneralRe: How to change the tabcontrol backcolor? Pin
Mosquito1096-Jan-06 19:16
memberMosquito1096-Jan-06 19:16 
GeneralMeasureItem Pin
blvlboy13-May-04 7:53
memberblvlboy13-May-04 7:53 
GeneralGood on1 Pin
Prashanthan5-May-04 4:23
memberPrashanthan5-May-04 4:23 
GeneralRe: Good on1 Pin
Anonymous6-May-04 15:54
sussAnonymous6-May-04 15:54 
GeneralRe: Good on1 Pin
richmondd21-Sep-04 8:01
memberrichmondd21-Sep-04 8:01 
GeneralRe: Good on1 Pin
Kevin M Ireland14-Dec-05 1:37
memberKevin M Ireland14-Dec-05 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 17 Feb 2004
Article Copyright 2004 by Amalorpavanathan Yagulasamy(AMAL)
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid