tomweber
2016-01-22T22:34:16Z
Hello,

I'm using the

CellMouseUp(sender As Object, e As iGCellMouseUpEventArgs) Handles iGridBoard.CellMouseUp

event, and I would like to convert the e.MousePos coordinates to the cell rectangle coordinates.

For example, when I am clicking exactely the top-left corner of a certain cell, I would like to get a value of x=0, y=0.

But I don't know how I can convert the e.MousePos to the cell's rectangle coordinates.

Can somebody help?

Thank you.
Igor/10Tec
2016-01-23T09:58:22Z
I think you should use the iGCell.GetBounds() method to retrieve the cell coordinates and then calculate the values you need. Both iGCell.GetBounds() and iGCellMouseUpEventArgs give you the coordinates relative to the upper left corner of the grid.