5,388
社区成员
发帖
与我相关
我的任务
分享
procedure TGPageControl.DrawTab(TabIndex: Integer; const Rect: TRect; Active: Boolean);
var
sCaption: string;
oRect: TRect;
begin
if TabIndex = Self.TabIndex then
begin
with Self.Canvas do
begin
Font.Color := clWhite;
Brush.Color := clHighlight;
FillRect(Rect);
end;
end;
sCaption := Self.Pages[Self.TabIndex].Caption;
oRect := Rect;
DrawText(Self.Canvas.Handle, Pchar(sCaption), Length(sCaption),
oRect, DT_SINGLELINE or DT_CENTER or DT_VCENTER);
end;