Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: controlling appearance of links in Text views



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.

References: 
 >controlling appearance of links in Text views (From: m <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.