Ver Mensaje Individual
  #3  
Antiguo 08-01-2007
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

No tengo mucha idea de ese control, pero, haciendo alguna prueba, me parece que bastaría conque según fueras añadiendo las distintas filas, actualizaras la propiedad "Row" del "StringGrid". Algo así:

Código Delphi [-]
var
  i: integer;
begin
  StringGrid1.RowCount := 100;
  for i := 0 to StringGrid1.RowCount-1 do
  begin
    StringGrid1.Rows[i].Add(IntToStr(i));
    StringGrid1.Row := i;
  end;
end;

Edito: Bicho se me adelantó y puede que su respuesta merezca más la pena que la mía aunque diría que son similares.

Y sin embargo el anterior código no se comporta igual que este otro:

Código Delphi [-]
var
  i: integer;
begin
  StringGrid1.RowCount := 100;
  for i := 0 to StringGrid1.RowCount-1 do
  begin
    StringGrid1.Rows[i].Add(IntToStr(i));
    StringGrid1.Row := StringGrid1.RowCount-1;
  end;
end;

Cosas del StringGrid, digo yo, vamos.
__________________
David Esperalta
www.decsoftutils.com

Última edición por dec fecha: 08-01-2007 a las 16:45:35.
Responder Con Cita