Alguien Sabe Como lograr que cuando se seleccione una celda en un StringGrid se seleccione todo el renglon por lo menos visualmente con este codigo se logra
poner de un solo color todas las celdas respetando los fix
void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, long Col, long Row,
TRect &Rect, TGridDrawState State)
{
if (State.Contains(gdFixed))
{
StringGrid1->Canvas->Brush->Color = clBtnFace;
StringGrid1->Canvas->Font->Color = clWindowText;
StringGrid1->Canvas->FillRect(Rect);
Frame3D(StringGrid1->Canvas, Rect, clBtnHighlight, clBtnShadow, 1);
} //if the cell is selected
else if (State.Contains(gdSelected))
{
StringGrid1->Canvas->Brush->Color = clHighlight;
StringGrid1->Canvas->Font->Color = clHighlightText;
StringGrid1->Canvas->FillRect(Rect);
}
else
{
StringGrid1->Canvas->Brush->Color = clBlue;
StringGrid1->Canvas->Font->Color = clRed;
StringGrid1->Canvas->FillRect(Rect);
}
AnsiString text = StringGrid1->Cells[Col][Row];
StringGrid1->Canvas->TextRect(Rect, Rect.Left, Rect.Top, text);
}