Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7717487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:54:44+00:00 2026-06-01T02:54:44+00:00

Just a follow up question to this one here => link Is it possible

  • 0

Just a follow up question to this one here => link
Is it possible to change the text colour of a TabSheet caption to another colour (eg. White) and change the font style to ‘bold’?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:54:45+00:00Added an answer on June 1, 2026 at 2:54 am

    Maybe this might give you such inspiration. Again, please note this will work only on Windows and with themes disabled in your application.

    uses
      ComCtrls, Windows, LCLType;
    
    type
      TPageControl = class(ComCtrls.TPageControl)
      private
        procedure CNDrawItem(var Message: TWMDrawItem); message WM_DRAWITEM;
      protected
        procedure CreateParams(var Params: TCreateParams); override;
      end; 
    
    implementation
    
    procedure TPageControl.CreateParams(var Params: TCreateParams);
    begin
      inherited CreateParams(Params);
      with Params do
      begin
        if not (csDesigning in ComponentState) then
          Style := Style or TCS_OWNERDRAWFIXED;
      end;
    end;
    
    procedure TPageControl.CNDrawItem(var Message: TWMDrawItem);
    var
      FontHandle: HFONT;
      FontColor: COLORREF;
      FontObject: TLogFont;
      BrushColor: COLORREF;
      BrushHandle: HBRUSH;
    begin
      with Message.DrawItemStruct^ do
      begin
        GetObject(Font.Handle, SizeOf(FontObject), @FontObject);
        case itemID of
          0:
          begin
            BrushColor := RGB(235, 24, 33);
            FontColor := clWhite;
            FontObject.lfWeight := FW_NORMAL;
            FontObject.lfItalic := 0;
          end;
          1:
          begin
            BrushColor := RGB(247, 200, 34);
            FontColor := clGreen;
            FontObject.lfWeight := FW_NORMAL;
            FontObject.lfItalic := 1;
          end;
          2:
          begin
            BrushColor := RGB(178, 229, 26);
            FontColor := clGreen;
            FontObject.lfWeight := FW_BOLD;
            FontObject.lfItalic := 1;
          end
          else
            BrushColor := ColorToRGB(clBtnFace);
        end;
    
        BrushHandle := CreateSolidBrush(BrushColor);
        FillRect(hDC, rcItem, BrushHandle);
    
        FontHandle := CreateFontIndirect(FontObject);
        try
          SelectObject(hDC, FontHandle);
          SetTextColor(hDC, FontColor);
          SetBkMode(hDC, TRANSPARENT);
          DrawTextEx(hDC, PChar(Page[itemID].Caption), -1, rcItem, DT_CENTER or
            DT_VCENTER or DT_SINGLELINE, nil);
        finally
          DeleteObject(FontHandle);
        end;
      end;
      Message.Result := 1;
    end;
    

    Here is how it looks like:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a follow up question from my previous one found here I need
This question is a follow on from the one that was asked here .
This is a follow up to a question I just posted. I'm wondering how
This is a follow up from a question of mine that was just answered
This is a follow-up of this question on here http://iphonedevelopment.blogspot.com/2010/02/drawing-hud-display-in-opengl-es.html It tackles on the
All, this is a follow up from a previous question here: C# formatting external
Disclaimer: I know this type of question has been asked here before, I just
this is a follow up question from my previous one. you can find it
Question follows on from Fluent NHibernate + multiple databases (no need to follow this
There are some other variations of this question here at SO, but please read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.