Solved

TTabSheet

Posted on 2000-04-10
1
250 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Using YubiKey with REST API application 2 115
python question 5 76
Help to convert powershell script into a gui 9 169
VbScript to countdown to New Year's Day 6 54
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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 …

786 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