?
Solved

TTabSheet

Posted on 2000-04-10
1
Medium Priority
?
254 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
[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
1 Comment
 
LVL 10

Accepted Solution

by:
Lischke earned 200 total points
ID: 2715294
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

Technology Partners: 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 connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

770 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