karlita_cb
31-05-2004, 20:57:00
Hola, creo que la solución a mi problema es algo simple, pero no sé como corregirlo. Tengo un edit y dando clic a un botó quiero pasar el contenido del edit a un stringgrid, el problema es que lo hace una vez, pero las siguientes lo sobrepone en el primer renglón. Mi código es algo así:
begin
i:=0;
j:=0;
c:=strtoint(b);
if (c <= 126) then
begin
stringgrid1.Cells[i,j]:=a;
i:=1;
stringgrid1.Cells[i,j]:='255.0.0.0';
i:=2;
stringgrid1.Cells[i,j]:='A';
edit5.Text:='A';
INC(j);
end
else
if (c>126) and (c<= 191) then
begin
stringgrid1.Cells[i,j]:=a;
i:=1;
stringgrid1.Cells[i,j]:='255.255.0.0';
i:=2;
stringgrid1.Cells[i,j]:='B';
edit5.Text:='B';
inc(j);
end;
end;
Gracias por la ayuda....
begin
i:=0;
j:=0;
c:=strtoint(b);
if (c <= 126) then
begin
stringgrid1.Cells[i,j]:=a;
i:=1;
stringgrid1.Cells[i,j]:='255.0.0.0';
i:=2;
stringgrid1.Cells[i,j]:='A';
edit5.Text:='A';
INC(j);
end
else
if (c>126) and (c<= 191) then
begin
stringgrid1.Cells[i,j]:=a;
i:=1;
stringgrid1.Cells[i,j]:='255.255.0.0';
i:=2;
stringgrid1.Cells[i,j]:='B';
edit5.Text:='B';
inc(j);
end;
end;
Gracias por la ayuda....