关键字:Delphi StringGrid
如何实现在stringgrid中删除鼠标点中的那一行,下一行再顶上的效果? procedure TForm1.Button1Click(Sender: TObject);
var
Sel : TGridRect;
begin
Sel := StringGrid1.Selection;
DeleteRow(Sel.Top);
end;
// delete row
procedure TForm1.DeleteRow(Row: Integer);
var
i : integer;
begin
if (Row < StringGrid1.RowCount) and (Row > Stringgrid1.FixedRows-1) then
if Row < StringGrid1.RowCount - 1 then
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/