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.

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

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

Learn More

Forum Channels