NSMenu custom item

How can I do NSMenu creation for a menu, for example?

Is it NSMenu or is it a borderless window, and if so, how can I do this? Thanks!

http://a5.mzstatic.com/us/r1000/049/Purple/b1/33/08/mzl.bmiomoxu.800x500-75.jpg

+2
source share
3 answers

This application runs on the OSX status bar.

See Programming the status bar in Apple. In addition, NSStatusBar and NSStatusItem

This SO entry has extra pointers:

How to create a Menubar app for Mac

+2
source

In particular, it can be a custom view of NSPopover , NSWindow or even NSStatusItem.view . In the case of NSWindow (often an NSPanel service form) (or NSPopover ), you will manually open the window when you click on a status item using the status item -(void)setAction and -(void)setTarget . If you use a custom view for a status item, this will be done in -mouseDown:

Check out this post - I found this helpful.

+1
source

See the documentation for NSStatusItem . I believe that you can display the view instead of the standard NSMenu , which is similar to what they do in this image.

0
source

All Articles