Handling hyperlinks in an NSBrowserCell
Handling hyperlinks in an NSBrowserCell
- Subject: Handling hyperlinks in an NSBrowserCell
- From: Graham <email@hidden>
- Date: Fri, 9 Jun 2006 12:33:35 -0400
I have an NSBrowser with custom cells.
The text I am displaying in the cells can have html hyperlink tags in
it as well as plain text (the content of this text is out of my
control).
I want to display the hyperlinks as actual links (in blue) and have a
handcursor when the mouse is over them and when clicked launch the
browser.
Since I am dealing with cells here and not Views it seems like I have
to do all of the work myself, that is:
1) parse the text using NSXMLParser to find the <a tags and replace
them with Link attributes and blue color (for example)
2) handle resetCursorRects in the parent matrix to draw the hand
cursor in the appropriate positions
3) generate a message on mousedown when over some text that has a
link attribute
Am I going the right path here or is there anything to reduce the
amount of work for this?
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden