Posted 8 September 2017, 1:31 pm EST
So I get a valid return for the row and column when I'm on the parent column of a hierarchical grid.
As soon as I move the cursor to a child column, GetCellFromPixel returns the -1 I cant find it thing.
Here's the code I'm using:
PrivateSub fpConditions_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles fpConditions.MouseMove
Dim InCell As FarPoint.Win.Spread.Model.CellRange
Dim RVI As Integer
Dim CVI As Integer
RVI = fpConditions.GetRowViewportIndexFromY(e.Y)
CVI = fpConditions.GetColumnViewportIndexFromX(e.X)
InCell = fpConditions.GetCellFromPixel(RVI, CVI, e.X, e.Y)
txtRowNumber.Text = InCell.Row.ToString
txtColumnNumber.Text = InCell.Column.ToString
I suspect this has something to do with knowing what viewport you're on??
Oh this is an older version - 2.0.6
Im having a hard time wrapping my head around what a viewport is. How can we have multiple ones on the same sheet if I didn't establish them.
Or does the hierarchical view do that?