CODE
procedure TOKBottomDlg1.Cloner1Click(Sender: TObject);
var i,j:Integer;
mpos: TPoint;
begin
GetCursorPos(mpos);
mpos:=NextGrid1.ScreenToClient(mpos);
i:=NextGrid1.GetRowAtPos(mpos.X,mpos.Y);
if i=-1 then Exit;
NextGrid1.AddRow(1);
...
end;
var i,j:Integer;
mpos: TPoint;
begin
GetCursorPos(mpos);
mpos:=NextGrid1.ScreenToClient(mpos);
i:=NextGrid1.GetRowAtPos(mpos.X,mpos.Y);
if i=-1 then Exit;
NextGrid1.AddRow(1);
...
end;
There is 1 row in the grid, but when I right-click on it, GetRowAtPos return -1
I guess it's because the pop-up option is not over the row...
So, how can I retrieve this f****** row number ?