screen.cursor:=crdefault;
end;
使用方法:
procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
c:integer;
w:integer;
Grid:TStringGrid;
begin
Grid := Sender as TStringGrid;
with Grid do
if y<=rowheights[0] then
begin
c:=0;
w:=colwidths[0];
while (c begin
inc(c);
w:=w+colwidths[c]+gridlinewidth;
end;
sortgrid(Grid,c,0);
end;
end;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/