请大家帮忙看看下面代码添加第一次的时候插入2行,在点击一次就1行,怎么把他弄成每次点击都是1行啊procedure TMain.N27Click(Sender: TObject);
var
i,frow:integer;
begin
frow:=stringgrid1.row;//记录当前选定行的位置
stringgrid1.rowcount:=stringgrid1.rowcount+1;
for i:=stringgrid1.rowcount downto frow+1 do begin
stringgrid1.Rows[i]:=stringgrid1.Rows[i-1];
stringgrid1.Rows[frow+1].Clear;
end;end;
var
i,frow:integer;
begin
frow:=stringgrid1.row;//记录当前选定行的位置
stringgrid1.rowcount:=stringgrid1.rowcount+1;
for i:=stringgrid1.rowcount downto frow+1 do begin
stringgrid1.Rows[i]:=stringgrid1.Rows[i-1];
stringgrid1.Rows[frow+1].Clear;
end;end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货