ReoGrid icon indicating copy to clipboard operation
ReoGrid copied to clipboard

Update HyperLinkCell.cs

Open lamazze opened this issue 5 years ago • 2 comments

I've made all the modifications based on the behavior of the Latest Excel under Windows: the cursor changes only when the mouse is over the text.

To achieve that:

  1. I've changed the name of the property from IsPressed to IsOverLink.
  2. I've removed OnStartEdit because you can still edit the cell even if the mouse is over the link.
  3. I've remove the event OnMouseEnter and replaced them with OnMouseMove. OnMouseLeave is still there.
  4. OnMouseMove mouse check if the mouse is over the text and change IsOverLink accordingly and manage the cursor
  5. For each events, the default behavior is kept. Example: Even if the mouse is down over the text, you can still move outside the cell and select a range
  6. In Excel, with the mouse down over the link, if you move the mouse before mouse up, the navigate process is stopped. Unfortunately, I couldn't reproduce since when the mouse is down, OnMouseMove isn't receiving any events. Not sure why. Same for OnMouseLeave, not sure it's useful.

lamazze avatar Mar 20 '20 17:03 lamazze

@lamazze Thanks! Nice changes! Since it makes some behaviors doesn't compatible with the original hyperlink, I will make another change to implement your requirement.

jingwood avatar Mar 23 '20 05:03 jingwood

Issue #309

jingwood avatar Mar 24 '20 00:03 jingwood