以下为代码
procedure tform1.clk(cap:string);
var s:string;
begin
    rowno:=stringgrid1.Row;
    colno:=stringgrid1.Col;
    stringgrid1.Cells[colno,rowno]:=cap;
   case colno of
   0: begin colno:=1; s:=inputbox('','input the first page',''); stringgrid1.Cells[colno,rowno]:=s; if rowno<15 then begin stringgrid1.Col:=0; stringgrid1.Row:=stringgrid1.Row+1; end else stringgrid1.Col:=2;stringgrid1.Row:=1;end;
   2: begin colno:=3; s:=inputbox('','input the first page',''); stringgrid1.Cells[colno,rowno]:=s; if rowno<15 then begin stringgrid1.Col:=2; stringgrid1.Row:=stringgrid1.Row+1;end else edit2.focused; end;
end;
end;
stringgrid组件中有4列15行,希望能在每次输入后能实现自动跳行。以上有什么问题呢?