I want to do something like hot tracking on a cell but only when the mouse is over the text in the cell. I have an email address there and when someone mouse's over I want to change the color (just like with a URL style). Also when the text is clicked I will do the email function.
I know how to use the MouseEnterElement and I think there is an element for just text but I can't remember what it is. Maybe there is a better way. Can someone show me how to detect when the mouse is over the text of the cell and not just the cell itself?
Thanks!
I figured it out. Set the style to FormattedLinkLabel and then check the mouseenterelement event for something like this:
If Not cell Is Nothing Then
'WE ARE IN A CELL NOW CHECK AND SEE IF WE ARE OVER THE TEXT OF THE CELL
'
If e.Element.GetType.ToString.ToLower.EndsWith(".textsectionuielement") Then
IsOverCellText = True
cell.Appearance.Cursor = Cursors.Hand
Else
IsOverCellText = False
End If
And then on the mouseleaveelement event check for the samething but replace the color.