Re: How to set the color of a string on a NSButton?
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