hola que tal
eh estado viendo en el foro. sobre como cambiar el
color de uan fila en un
stringgrid
pero asta orita nomas eh visto cambiar el
color de una celda. no de toda una fila o renglon.
una de estas forma es este:
Código Delphi
[-]
Procedure TForm1.Grid1DrawCell(Sender: TObject; ACol, ARow:
Longint; Rect: TRect; State: TGridDrawState);
Begin
with Sender as TDrawGrid do
begin
if (aCol = 3) and (FSeleccionada) then
Begin
Canvas.Brush.Color := clBlue;
Canvas.Font.Color := clWhite;
end
else Begin
Canvas.Brush.Color := clBackGround;
Canvas.Font.Color := clBlack;
end;
Canvas.FillRect(Rect);
Canvas.TextRect(Rect, 0, 0, (Sender as TStringGrid).Cells[ACol, ARow]);
if gdFocused in State then
Canvas.DrawFocusRect(Rect);
end;
end;
end;