EnterCell (V 2.5)

Posted by: griswald88 on 8 September 2017, 12:42 pm EST

  • Posted 8 September 2017, 12:42 pm EST

     Is there a way to determine if the user clicked on a Row/Column header from the EnterCell event?
  • Replied 8 September 2017, 12:42 pm EST


    You can query the GetColumnHeaderCellFromPixel method to determine if the mouse is over a ColumnHeader.

      Private Sub FpSpread1_EnterCell(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EnterCellEventArgs) Handles FpSpread1.EnterCell
    Dim cr As FarPoint.Win.Spread.Model.CellRange
    Dim p As Point = FpSpread1.PointToClient(New Point(MousePosition.X, MousePosition.Y))
    cr = FpSpread1.GetRootWorkbook.GetColumnHeaderCellFromPixel(p.X, p.Y)
    If cr.Column > -1 Then
    MsgBox("Your mouse is over a ColumnHeader")
    End If
    End Sub
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels