• 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: "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


References: 
 >Setting text color in a NSFormCell (From: "R.L. Grigg" <email@hidden>)
 >Re: Setting text color in a NSFormCell (From: Nick Zitzmann <email@hidden>)
 >Re: Setting text color in a NSFormCell (From: "R.L. Grigg" <email@hidden>)
 >Re: Setting text color in a NSFormCell (From: Michael Babin <email@hidden>)

  • Prev by Date: Re: How to have one array controller observing the other
  • Next by Date: Re: Thin Windows
  • Previous by thread: Re: Setting text color in a NSFormCell
  • Next by thread: Exception in NSPersistentStoreCoordinator addPersistentStoreWithType with html string data, sometimes
  • Index(es):
    • Date
    • Thread