Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HyperLinkCell.cs #318

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Update HyperLinkCell.cs #318

wants to merge 3 commits into from

Conversation

lamazze
Copy link
Contributor

@lamazze lamazze commented Mar 20, 2020

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 and others added 2 commits March 20, 2020 18:43
I've made all the modifications based on the behavior of the Latest Excel under Windows: the cursor change 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. OnMouse 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 event. Not sure why. Same for OnMouseLeave, not sure it's useful.
@jingwood
Copy link
Member

@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
Copy link
Member

Issue #309

@jingwood jingwood changed the base branch from master to develop November 28, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants