• 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: How to set the color of a string on a NSButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the color of a string on a NSButton?


  • Subject: Re: How to set the color of a string on a NSButton?
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 23 Nov 2006 00:27:04 -0700


On Nov 23, 2006, at 12:22 AM, stephen joseph butler wrote:

You get that error because what you have is not an
NSMutableAttributedString. I don't know if this ultimately does what
you want, but it will solve your immediate problem:

NSAttributedString *coloredString = [[[NSAttributedString alloc]
initWithString:[threeButton stringValue] attributes:textDictionary]
autorelease];

[threeButton setStringValue:coloredString];

That won't work either, since -setStringValue: takes an NSString and not an NSAttributedString. The two classes are not remotely related to one another.


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




_______________________________________________

Cocoa-dev mailing list      (email@hidden)

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: 
 >How to set the color of a string on a NSButton? (From: David Hinz <email@hidden>)
 >Re: How to set the color of a string on a NSButton? (From: "stephen joseph butler" <email@hidden>)

  • Prev by Date: Re: How to set the color of a string on a NSButton?
  • Next by Date: Re: How to set the color of a string on a NSButton?
  • Previous by thread: Re: How to set the color of a string on a NSButton?
  • Next by thread: Re: How to set the color of a string on a NSButton?
  • Index(es):
    • Date
    • Thread