thanks for that... i've noticed that if i don't actively add an NSFontAttributeName to the attributes, the new attributed string will default as a smaller, different font... is this normal? if so what is the default font and size of NSMenuItems?
On Fri, Dec 12, 2008 at 8:21 AM, <[email protected]> wrote: > > 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 protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
