• 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: Setting text color in a NSFormCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting text color in a NSFormCell


  • Subject: Re: Setting text color in a NSFormCell
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 23 Oct 2007 11:37:56 +1300


On Oct 23, 2007, at 11:03 AM, R.L. Grigg wrote:

Newb question: Is there a way to set/change the color of the text displayed in a NSFormCell?

Yes.

NSFormCell does'nt seem to have methods like setTextColor or setBackgroundColor etc. so I'm not sure how to approach this. At times I need to display red text in certain cells when data from a array of sensors goes out of range and set it back to black when those elements indicate normal conditions.

NSFormCell does have a -setAttributedStringValue: method. You may, however, be able to automate what you're trying to do by using NSNumberFormatter.


Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Setting text color in a NSFormCell
      • From: "R.L. Grigg" <email@hidden>
References: 
 >Setting text color in a NSFormCell (From: "R.L. Grigg" <email@hidden>)

  • Prev by Date: Re: telling when a directory is really a bundle
  • Next by Date: Re: Setting text color in a NSFormCell
  • Previous by thread: Setting text color in a NSFormCell
  • Next by thread: Re: Setting text color in a NSFormCell
  • Index(es):
    • Date
    • Thread