Re: controlling appearance of links in Text views
Re: controlling appearance of links in Text views
- Subject: Re: controlling appearance of links in Text views
- From: Douglas Davidson <email@hidden>
- Date: Tue, 27 Jan 2004 14:31:46 -0800
On Jan 27, 2004, at 12:46 PM, m wrote:
It used to be (in 10.2 for example) that text tagged with
NSLinkAttributeName did not change its appearance. In 10.3, text
tagged with NSLinkAttributeName is blue and underlined. This is a neat
trick, but I really want to control how it appears. I've tried tagging
the text with both NSLinkAttributeName and attributes like
NSForegroundColorAttributeName but the NSLinkAttributeName seems to
trump the others.
See the AppKit release notes for 10.3. NSTextView now has a set of
link attributes that will automatically be applied to link text. For
applications linked prior to 10.3, there are no default link
attributes. For applications linked on 10.3 and later, the default
link attributes are blue and underlined. To restore the pre-10.3
behavior for such an application, call [textView
setLinkAttributes:nil]. If you want to use the link attributes, but
override the attributes for a specific link, use NSLayoutManager's
temporary attributes to do so.
Douglas Davidson
_______________________________________________
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.