• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: controlling appearance of links in Text views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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

  • Prev by Date: NSStream and descriptors
  • Next by Date: Creating a web browser popup menu
  • Previous by thread: controlling appearance of links in Text views
  • Next by thread: cocoa -> c++
  • Index(es):
    • Date
    • Thread