• 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
Is [Red] the only special color for NSNumberFormatter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is [Red] the only special color for NSNumberFormatter?


  • Subject: Is [Red] the only special color for NSNumberFormatter?
  • From: email@hidden
  • Date: Mon, 19 May 2008 15:57:16 +0200

According to http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumberFormatter_Class/Reference/Reference.html :

****

An even simpler way to cause negative values to be displayed in red is to include the constant [Red] in your format string, as shown in this example:

[numberFormatter setFormat:@"$#,##0.00;[Red]($#,##0.00)"];
****
Can any other colors be used here, or is it just red?
If other colors are allowed, is it a fixed set, or does it automagically create a color from a NSColor class method with the correct name


e.g:

[numberFormatter setFormat:@"$#,##0.00;[DarkGray]($#,##0.00)"];
Would use +[NSColor darkGrayColor].


Matt _______________________________________________

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: Is [Red] the only special color for NSNumberFormatter?
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: Cocoa et al as HCI usability problem
  • Next by Date: Re: Background Application.
  • Previous by thread: Re: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)
  • Next by thread: Re: Is [Red] the only special color for NSNumberFormatter?
  • Index(es):
    • Date
    • Thread