Re: clickedOnLink called outside of the link
Re: clickedOnLink called outside of the link
- Subject: Re: clickedOnLink called outside of the link
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 28 Apr 2004 14:16:15 +0100
On 28 Apr 2004, at 10:08 am, Yann Bizeul wrote:
Hi list.
I have a problem handling the location of a mouse click on a link.
I set NSUnderlineStyleAttributeName on this mutableString, and only
what I want to be a link is underlined, that's good, but if I click
before the link (it is a tabulation character) the link just after is
clicked.
Any idea ?
Well, I have an idea, but no definite answer. I've also seen this
behaviour. If you create a really wide tab and observe closely, you can
see what's happening. Clicking along the tab from the left, at first
nothing happens. Then, when you get close enough, the insertion point
jumps to the beginning of the linked text.
I haven't come across any documentation on this, but it appears that
the default handling of a click on a tab is to pass the insertion point
back to the previous - or forward to the next - text character in the
string. If that character is linked, then the link will be "clicked".
Regards
- Jeremy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.