Hola buscando me econtre un enlace donde muestra como pintar una celda en especifico aqui te lo dejo
http://stackoverflow.com/questions/6...in-string-grid
La prueba esta hecha en Lazarus 1.6 pero seguro servira igual en Delphi
Bueno y en base a la respuesta del usuario @
RRUZ pues hize esto:
Código Delphi
[-]procedure TForm1.StringGrid1DrawCell(Sender: TObject; aCol, aRow: Integer;
aRect: TRect; aState: TGridDrawState);
var
i,j:Integer;
begin
if (ACol >=1) and (ARow =StringGrid1.Row) then
with TStringGrid(Sender) do
begin
Canvas.Brush.Color := clBlue;
Canvas.FillRect(aRect);
Canvas.TextOut(aRect.Left+2,aRect.Top+2,Cells[ACol, ARow]);
end;
if (ACol = StringGrid1.Col) and (ARow = StringGrid1.Row) then
with TStringGrid(Sender) do
begin
Canvas.Brush.Color := clYellow;
Canvas.FillRect(aRect);
Canvas.TextOut(aRect.Left+2,aRect.Top+2,Cells[ACol, ARow]);
end;
end;
Ejemplo:
https://www.youtube.com/watch?v=x5kb...ature=youtu.be