2

how can i go about making a custom NSMenu for a menulet such as this?

Is this an NSMenu or is it a borderless window and if so how would i go about this? Thanks!

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

Grant Wilkinson
  • 1,088
  • 1
  • 13
  • 37

3 Answers3

2

It's an app running running on the OSX status bar.

See Status Bar Programming at Apple. Also, NSStatusBar and NSStatusItem

This SO post has some additional pointers:

How to create a Menubar application for Mac

Community
  • 1
  • 1
bryanmac
  • 38,266
  • 10
  • 89
  • 97
1

More specifically it could be an NSPopover, an NSWindow, or even NSStatusItem.view's custom view. In the case of an NSWindow (often a utility form of NSPanel) (or the NSPopover) you would manually open the window when the status item is clicked, using the status item's -(void)setAction and -(void)setTarget. If you use a custom view for the status item, this would be done in -mouseDown:.

Check out this post - I found it useful.

Vervious
  • 5,519
  • 3
  • 36
  • 54
0

Look at the documentation for NSStatusItem. I believe you can have it display a view instead of a standard NSMenu which is what it looks like they are doing in that image.

edc1591
  • 10,094
  • 6
  • 39
  • 63