Hallo Leute, bin zum ersten mal hier und bitte um eure Hilfe, schon mal Danke im vorraus !
Ich habe eine Schleife gebastelt und möchte die Werte, der Schleifendurchläufe, in den einzelnen Zellen (Spalte 'Wertentwicklung') eines stringgrid ausgeben aber wie ? Hier der Code.
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| begin y:= strtoint(edit3.Text); a:= strtofloat(edit1.Text); b:= strtofloat(edit2.Text); for z:= 1 to y do begin c:= a* (b/ 100); a:= c+ a; end; panel2.Caption:= floattostrf(a, ffcurrency, 10, 2); e:= strtoint(edit3.Text); stringgrid1.RowCount:= strtoint(edit3.Text)+ 1; stringgrid1.Cols[0].Strings[0]:= 'Laufzeit'; stringgrid1.Cols[1].Strings[0]:= 'Wertentwicklung'; stringgrid1.Cells[0,1]:= '1'; for d:= 1 to e do begin stringgrid1.Cols[0].Strings[d+ 1]:= inttostr(d+ 1); stringgrid1.Cols[1].Strings[d]:= '?'; end; |
Moderiert von
Christian S.: Delphi-Tags hinzugefügt