Re: Change Color Of Appended NSString?
Re: Change Color Of Appended NSString?
- Subject: Re: Change Color Of Appended NSString?
- From: email@hidden
- Date: Fri, 12 Dec 2008 14:21:28 +0100
On 12 Dec 2008, at 14:10, Chunk 1978 wrote:
i have an NSMenuItem who's title changes programtically. how can i
change the color of the appended string?
-=-=-=-=-
NSString *appendedTimeRemaining = [NSString stringWithFormat:@"%d
Hours", [self timeMenuSelection]];
[appendedTimeRemaining setColor:[NSColor grayColor]];
[MainMenu_Item3 setTitle:[NSString stringWithFormat:@"Stop Clock —
%s", appendedTimeRemaining]];
-=-=-=-=-
NSString doesn't have a setColor method.
I think you just need to use a properly set up NSAttributedString and
use [NSMenuItem setAttributedTitle].
Matt Gough_______________________________________________
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