Autor Beitrag
verzweifler
Hält's aus hier
Beiträge: 2



BeitragVerfasst: So 24.09.06 11:43 
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.

ausblenden 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);   // Laufzeit
    a:= strtofloat(edit1.Text); // Anfangskapital
    b:= strtofloat(edit2.Text); // Zinsen
  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 user profile iconChristian S.: Delphi-Tags hinzugefügt
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: So 24.09.06 11:50 
ausblenden Delphi-Quelltext
1:
    stringgrid1.Cols[1].Strings[d]:= IntToStr(d);					

Meinst du das?

Gruß Hape!