• 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: Changing text color for NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing text color for NSTableView


  • Subject: Re: Changing text color for NSTableView
  • From: Peter <email@hidden>
  • Date: Tue, 19 Nov 2002 14:49:44 +0800

I was not aware of NSAttributedString, after studying NSAttributedString, I tried another way and it works too. Instead of caching NSAttributedString or doing willDisplayCell delegate, I convert NSString to NSAttributedString for display.

1) change NSString type to NSAttributedString
2) willDisplayCell delegate method
3) convert NSString to NSAttributedString for tableView display

I wonder which one is the best way ?

Peter.

On Tuesday, November 19, 2002, at 02:28 AM, Ondra Cada wrote:


On Monday, Nov 18, 2002, at 17:56 Europe/Prague, Joseph Jones wrote:

Is it not possible to use an NSAttributedString instead of NSString with the
NSForegroundColorAttributeName to change the color?

It is, but unless you cache those attributed strings anyway, the delegate method's *MUCH* better.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.

  • Follow-Ups:
    • Re: Changing text color for NSTableView
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Changing text color for NSTableView (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Is Objective-C loaded?
  • Next by Date: Re: Close button on Single Window Utilities
  • Previous by thread: Re: Changing text color for NSTableView
  • Next by thread: Re: Changing text color for NSTableView
  • Index(es):
    • Date
    • Thread