Unit Unit1;
Interface
Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;
Type TForm1 =
Class(TForm)
Procedure FormCreate(Sender: TObject);
Procedure PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer;
Const Rect: TRect; Active: Boolean);
Private
_clTabColors:
Array[0..4]
of TColor;
End;
Var Form1: TForm1;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate(Sender: TObject);
Begin
_clTabColors[0] := Farbe11;
_clTabColors[1] := Farbe12;
_clTabColors[2] := Farbe13;
_clTabColors[3] := Farbe14;
_clTabColors[4] := Farbe15;
End;
Procedure TForm1.PageControlDrawTab(Control: TCustomTabControl; TabIndex: Integer;
Const Rect: TRect; Active: Boolean);
Const _sTabCaptions:
Array[0..4]
of Otring = ('
Hauptansicht', '
Einzelans.- Kunde', '
Best. Waren ges.', '
Warenlager', '
Eigene Umsätze');
Begin
Control.Canvas.Brush.Color := _clTabColors[TabIndex];
Control.Canvas.FillRect(Rect);
Control.Canvas.TextOut(Rect.Left+5,Rect.Top+3,_sTabCaptions[TabIndex]);
End;
End.