Is [Red] the only special color for NSNumberFormatter?
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