stringgrid敲回车进入下一行,这样不行吗?
我的代码如下:
procedure Tf_cgjh.bgKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key=vk_return then
if bg.col<>bg.colcount-1 then
bg.Col:=bg.Col+1
else
bg.row:=bg.row+1;
end;
我的代码如下:
procedure Tf_cgjh.bgKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key=vk_return then
if bg.col<>bg.colcount-1 then
bg.Col:=bg.Col+1
else
bg.row:=bg.row+1;
end;
else
begin
bg.rowcount:=bg.rowcount+1;
bg.row:=bg.row+1;
bg.cell:=spdm;
end;