Re: OS X : Different icon for Status Item
Re: OS X : Different icon for Status Item
- Subject: Re: OS X : Different icon for Status Item
- From: Simon Maurice <email@hidden>
- Date: Sun, 08 Dec 2013 16:34:35 +1100
Hi Jerry,
there are two methods which are used with NSStatusItem:
- (void)setImage:
- (void)setAlternateImage:
They both do exactly what you think they would. The setImage method just sets the standard image and alternate image is when it's activated. They both take an NSImage
See the reference code: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSStatusItem_Class/Reference/Reference.html
Cheers
Simon
On 8 Dec 2013, at 3:47 pm, Jerry Krinock <email@hidden> wrote:
> How can I make my app’s Status Item (“menulet", right side of menu bar) have a different icon than its icon shown in the Dock and Finder?
>
> I cannot find any mention of this in “Status Item Programming Topics”, and tests indicate that it simply uses the same .icns resource indicated by CFBundleIconFile in Info.plist. But I’ve seen other non-Apple apps do it, so apparently it can be done.
>
> Thanks,
>
> Jerry Krinock
> _______________________________________________
>
> 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
_______________________________________________
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