Code: Alles auswählen
procedure TForm1.Button4Click(Sender: TObject);
var
i,j,v : Integer;
Begin
For i:= 2 To 9 Do
Begin
v:= StrToInt(StringGrid2.Cells[i,0]);
j:= i;
While ((j > 1) and (StrToInt(StringGrid2.Cells[j-1,0]) > v)) Do
Begin
StringGrid2.Cells[j,0]:= StringGrid2.Cells[j-1,0];
dec(j);
End;
StringGrid2.Cells[j,0]:= IntToStr(v);
End;
End;
end.
Ich wollte jetzt euch mal fragen wo genau das Problem ist.
Ich sitze jetzt schon verdammt lange dadran und weiß einfach nicht, was ich falsch gemacht hab...
Bei Bedarf lad ich das ganze Projekt hoch :)
MfG zain2