Re: simulate click on NSStatusItem
Re: simulate click on NSStatusItem
- Subject: Re: simulate click on NSStatusItem
- From: Kyle Sluder <email@hidden>
- Date: Sun, 01 May 2011 17:40:49 -0700
On Sun, May 1, 2011 at 4:18 PM, Martin Batholdy <email@hidden> wrote:
> Hi,
>
>
> I am currently working on a StatusItem app
> (so I only have a small icon on the upper right side in the systemStatusBar).
>
> I recently implemented a shortcut for the main function of this status item app.
>
> Now when the shortcut-button is pressed an action is invoked just like you could invoke it by selecting the first menu item of the Status Item Menu.
>
> However when you use this keyboard-shortcut instead of the menu-item you don't get a feedback that something happened.
>
> The best feedback to the user that something happened would be (in my opinion) to see the menu item on the upper right side to go active ("Highlight-Mode") for a second and going inactive again
> (just like you clicked on it).
The menu item or the status item?
See -[NSStatusItem drawStatusBarBackgroundInRect:withHighlight:]. But
the API could probably be made easier by offering a -setHighlighted:
method.
--Kyle Sluder
_______________________________________________
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