Ver Mensaje Individual
  #3  
Antiguo 03-09-2012
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Ejemplo:

Código Delphi [-]
procedure TForm1.StringGrid1DrawCell(
  Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
  with Sender as TStringGrid do
    if Cells[ACol, ARow] = 'SÍ' then
    begin
      Canvas.Brush.Color := clGreen;
      Canvas.FillRect(Rect);
      Canvas.TextRect(Rect, Rect.Left + 2 ,Rect.Top + 2, Cells[ACol, ARow]);
    end;
end;

// Saludos
Responder Con Cita