Re: Setting text color in a NSFormCell
Re: Setting text color in a NSFormCell
- Subject: Re: Setting text color in a NSFormCell
- From: "R.L. Grigg" <email@hidden>
- Date: Tue, 23 Oct 2007 10:11:07 -0700
On Oct 23, 2007, at 6:09 AM, Michael Babin wrote:
Try using a paragraph style, as in:
NSMutableParagraphStyle *paragraphStyle =
[[[NSMutableParagraphStyle alloc] init] autorelease];
[paragraphStyle setAlignment: NSCenterTextAlignment];
NSDictionary *textDict=[NSDictionary dictionaryWithObjectsAndKeys:
[NSFont boldSystemFontOfSize:
10],NSFontAttributeName,
[NSColor
redColor],NSForegroundColorAttributeName,
paragraphStyle,
NSParagraphStyleAttributeName,
nil];
NSAttributedString *attrStr=[[[NSAttributedString alloc]
initWithString:descrip
attributes:textDict]
autorelease];
[fcell setAttributedStringValue:attrStr];
Thanks, Mike!
Russ
_______________________________________________
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