Ver Mensaje Individual
  #2  
Antiguo 15-09-2011
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola chinchan.

Un ejemplo con un StringGrid:
Código:
void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, int ACol,
      int ARow, TRect &Rect, TGridDrawState State)
{
  if (State.Contains(gdFocused)) {
    StringGrid1->Canvas->Brush->Color = clRed;
    StringGrid1->Canvas->FillRect(Rect);
    StringGrid1->Canvas->Font->Color = clYellow;
    DrawText(StringGrid1->Canvas->Handle,StringGrid1->Cells[ACol][ARow].c_str(),
             StringGrid1->Cells[ACol][ARow].Length(),&Rect,
             DT_NOCLIP | DT_SINGLELINE);
  }
}
Te aclaro que al abandonar el foco del TStringGrid, retornará a su color original.

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....

Última edición por ecfisa fecha: 15-09-2011 a las 18:24:53.
Responder Con Cita