Solved

TTabSheet

Posted on 2000-04-10
1
245 Views
Last Modified: 2010-04-16
How do you change the colour of the canvas of the 'tab' for each tabsheet in a pagecontrol. Here I am referring to the little rectangle which by default contains the text 'TabSheet1'. I am developing in DELPHI 5. NB!!!!
0
Comment
Question by:Diono
1 Comment
 
LVL 10

Accepted Solution

by:
Lischke earned 50 total points
Comment Utility
Hi Dione,

what you must do is to set the OwnerDraw property of TPageControl to True and assign an OnDrawTab event with something like the following code:

procedure TMainForm.PageControl1DrawTab(Control: TCustomTabControl;
  TabIndex: Integer; const Rect: TRect; Active: Boolean);
begin
  with Control do
  begin
    Canvas.Brush.Color := clRed;
    Canvas.FillRect(Rect);
  end;
end;

Ciao, Mike

PS: There's a special Delphi area here at E-E where question like this will be answered within an hour.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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.
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 …
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 …

762 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

13 Experts available now in Live!

Get 1:1 Help Now