Ver Mensaje Individual
  #1  
Antiguo 18-10-2007
Rasecma Rasecma is offline
Registrado
 
Registrado: oct 2007
Posts: 2
Reputación: 0
Rasecma Va por buen camino
ayuda stringgrid

como puedo usar stringgrid con suma de vectores, tengo un problema con el siguiente codigo:

procedure TForm1.Button1Click(Sender: TObject);
type
vect=array[1..10] of integer;
var
c:integer;
VectorC:TStringGrid;
a,b,r:vect;
begin
VectorC:=TStringGrid.create(Form1);
with VectorC do
begin
Colcount:=5;
RowCount:=1;
Left:=48;
Top:=220;
Height:=50;
Width:=320;
DefaultColwidth:=25;
DefaultRowHeight:=20;
FixedCols:=0;
FixedRows:=0;
parent:=form1;
end;
for c := 0 to vectorA.ColCount-1 do
begin
a[c]:=strtoint(vectorA.Cells[0,c]);
b[c]:= StrToInt(VectorB.Cells[0,c]);
r[c]:=a[c]+b[c];
vectorc.Cells[0,c]:=inttostr(r[c]);
end;
end;
Responder Con Cita