Q
qlw
Unregistered / Unconfirmed
GUEST, unregistred user!
几分钟前遇到的问题。我想获取光标所在的cell的行列值,
怎么得到的老是(-1,-1)?
笨死了,呵呵
procedure TForm1.ss(Sender: TObject);
var p:Tpoint;
g:TgridCoord;
begin
getcursorPos(p);
g:=stringgrid1.MouseCoord(p.x,p.y);
showmessage(inttostr(g.x)+' '+inttostr(g.y));
end;
怎么得到的老是(-1,-1)?
笨死了,呵呵
procedure TForm1.ss(Sender: TObject);
var p:Tpoint;
g:TgridCoord;
begin
getcursorPos(p);
g:=stringgrid1.MouseCoord(p.x,p.y);
showmessage(inttostr(g.x)+' '+inttostr(g.y));
end;