procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var i,j,m:integer; i1,j1:integer; begin if ([ssctrl]=shift) and (key=strtoint('46')) then begin i:=form1.StringGrid1.RowCount; j:=form1.StringGrid1.Row; i1:=form1.StringGrid1.ColCount; for m:=j to i-2 do begin for j1:=0 to i1-1 do begin form1.StringGrid1.Cells[j1,m]:=form1.StringGrid1.Cells[j1,m+1]; end; end; form1.StringGrid1.RowCount:=form1.StringGrid1.RowCount-1; end; end;
Shift: TShiftState);
var
i,j,m:integer;
i1,j1:integer;
begin
if ([ssctrl]=shift) and (key=strtoint('46')) then
begin
i:=form1.StringGrid1.RowCount;
j:=form1.StringGrid1.Row;
i1:=form1.StringGrid1.ColCount;
for m:=j to i-2 do
begin
for j1:=0 to i1-1 do
begin
form1.StringGrid1.Cells[j1,m]:=form1.StringGrid1.Cells[j1,m+1];
end;
end;
form1.StringGrid1.RowCount:=form1.StringGrid1.RowCount-1;
end;
end;
stringgrid1.Rows.Delete(i);