Ver Mensaje Individual
  #5  
Antiguo 27-02-2007
Avatar de Bicho
[Bicho] Bicho is offline
Miembro Premium
 
Registrado: jul 2003
Ubicación: Inca - Mallorca
Posts: 1.776
Reputación: 22
Bicho Va por buen camino
Hola,

procedure Tform1.PageControl1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean);

El último parámetro del procedimiento te indica si la pestaña a dibujar es la activa.

Probando con algo así me funciona (el efecto no es muy bueno a la vista pero sirve, habría que retocarlo)

Código Delphi [-]
procedure Tform1.PageControl1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean);
begin
  with PageControl1.canvas do begin
    fillrect(rect);
    brush.style := bsClear;
    if Active then font.Color := clRed
    else font.Color := clwhite;
    textout(rect.left+3,rect.top+3,PageControl1.Pages[TabIndex].Caption);
    if Active then font.Color := clGreen
    else font.Color := clBlack;
    textout(rect.left+2,rect.top+2,PageControl1.Pages[TabIndex].Caption);
  end;
end;

Saludos

P.d: y se me olvidaba, gracias por el apunte dec. tambien puedes usar el TabIndex para usar la pestaña que quieras
Responder Con Cita