Muchisimas Gracias
Dec!!!!!!!!!!!
Ya lo tengo en perfecto funcionamiento, y aparte he hecho que ademas de mostrar en gris el Tab deshabilitado, tambien hago que se muestre en otro color el Tab activo. Solo es una pequeña modificacion del codigo que me has pasado.
Código Delphi
[-]
procedure TFormVisitas.PageControl1DrawTab(
Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect;
Active: Boolean);
var
R,R2: TRect;
Texto,Texto2: String;
begin
if not (PageControl1.Pages[TabIndex].Enabled) then
Control.Canvas.Font.Color := clGrayText;
Texto2 := PageControl1.Pages[TabIndex].Caption;
R2 := Rect;
Control.Canvas.FillRect(R2);
if not Active then
InflateRect(R2, 0, -3);
if Active then
Control.Canvas.Font.Color := clBlue;
Texto := PageControlVisitas.Pages[TabIndex].Caption;
R := Rect;
Control.Canvas.FillRect(R);
if not Active then
InflateRect(R, 0, -3);
DrawText(Control.Canvas.Handle, PChar(Texto2), -1, R,
DT_SINGLELINE or DT_CENTER or DT_VCENTER);
DrawText(Control.Canvas.Handle, PChar(Texto), -1, R2,
DT_SINGLELINE or DT_CENTER or DT_VCENTER);
end;
Muchas gracias otra vez!!!!!!! Agradezco mucho tu tiempo!!!!