(1)先把 PageControl1 的 OwnerDraw 属性设为 true
(2)程序代码修改如下:
procedure TForm1.PageControl1DrawTab(Control: TCustomTabControl;
    TabIndex: Integer; const Rect: TRect; Active: Boolean);
begin
    if Active then
    begin
    Control.Canvas.Brush.Color:=clBlue;
    Control.Canvas.Font.Color:=clWhite;
    end
    else
    begin
    Control.Canvas.Brush.Color:=clBtnFace;
    Control.Canvas.Font.Color:=clBlack;
    end;
    Control.Canvas.FillRect(Rect);
    Control.Canvas.TextOut(Rect.Left+3, Rect.Top+3, PageControl1.Pages[TabIndex].Caption);
end;

posted on 2013-04-22 00:15  del88  阅读(37)  评论(0编辑  收藏  举报