The NSStatusItem class represents the individual elements displayed within an NSStatusBar object.
Questions tagged [nsstatusitem]
218 questions
4
votes
2 answers
Weird behavior: dragging from Stacks to status item doesn't work
My application allows dragging to both the main window and to a Status item.
If I drag a file from Stacks to my window, it works perfectly.
If I drag a file from Finder to my window, it works perfectly.
If I drag a file from Finder to my status…

Alexandre
- 5,035
- 7
- 29
- 36
4
votes
1 answer
Notification of User Opening other NSStatusItem's Menu on a Mac
I'm writing a mac app that sits in the menu bar and presents the user with a NSPanel instance when they click the status item. I want to hide the window whenever another status item's menu is opened. Right now, my panel stays open; it looks like…

Ash Furrow
- 12,391
- 3
- 57
- 92
4
votes
1 answer
How to get all NSStatusItem elements of NSStatusBar in OSX?
I need get all elements in the status bar in OSX.
I tried to get the NSStatusBar id of the System: [NSStatusBar systemStatusBar] but I don't know how can I get all NSStatusItems in it.
I found a private method named _items in NSStatusBar but I can't…

Jonathan Chacón
- 76
- 2
- 6
4
votes
1 answer
NSStatusItem tooltip – change delay
I have a NSStatusItem to which I've added a tooltip using the setToolTip: method.
Everything works, except that the delay before showing the tooltip seems to be about 3 seconds, which is not ideal for my application.
Is there a way to change the…

houbysoft
- 32,532
- 24
- 103
- 156
4
votes
1 answer
How to keep focus on NSStatusItem until toggling it again
I'm building an app the uses a NSStatusItem. I'm wanting my NSStatusItem to open when clicked and stay open until the user clicks the NSStatusItem again. As of right now, it opens the menu but the NSStatusItem loses focus when I click away from it…

0SX
- 1,252
- 6
- 24
- 47
4
votes
1 answer
Fake NSWindow with a NSView inside a NSMenuItem
Before I start I should say I know this seems like a long shot, however I figured it was worth a try.
One app I am working on right now is a Mac Statusbar App. It has a NSStatusItem in the menubar and when clicked it will display a custom window…

Colin Wheeler
- 3,343
- 2
- 21
- 23
4
votes
4 answers
Remove highlight from NSMenuItem after click?
I have added a custom view to my subclass of NSMenuItem (which sits in a NSStatusMenu), which means that by default it will not get "highlighted" with a blue/gray background.
I implemented this by using the following code:
-…

rdougan
- 7,217
- 2
- 34
- 63
4
votes
1 answer
Save preference to show or hide NSStatusItem
I've got an application which runs as a normal app but also has a NSStausItem.
I wanted to implement the ability to set in the preferences a checkbox and when this checkbox is turned on the status item should be shown, but when the checkbox is off…

dehlen
- 7,325
- 4
- 43
- 71
4
votes
1 answer
Removing NSStatusItem view
One I set a view for NSStatusItem by setView:, how can i remove it later on if I want to? Is this even possible? Thanks.

user635064
- 6,219
- 12
- 54
- 100
4
votes
3 answers
NSStatusItem Button Title to the Right of the Image
I want an NSStatusItem’s button’s title to appear to the right of its image. Here’s an example, this is the OS X VPN menubar app:
If I set either the title or image for my NSStatusItem’s button, they render correctly. However if I set both, they…

magiclantern
- 768
- 5
- 19
4
votes
1 answer
NSStatusItem fullscreen issues
I'm making a statusbar app that displays an NSPopover when the NSStatusItem is clicked, like this:
I have added the ability to resize the popover by dragging on the edges, by subclassing the popover's view like this:
class CMView: NSView {
let…

Conor Taylor
- 2,998
- 7
- 37
- 69
4
votes
1 answer
How do I use an indeterminate status indicator as the image for an NSStatusItem?
I have an application that is an NSStatusItem.
It has a few different modes, each of which require an external process to be launched, during which the icon is simply highlighted, and appears to be frozen.
I want to use the -setImage: method (or…

Abraham Vegh
- 1,490
- 1
- 12
- 32
4
votes
2 answers
Highlight NSStatusItem when triggered programmatically
I have an NSStatusItem with an attached menu that I'm triggering with a global hotkey. If I click the menu item I get the highlight as usual, if I use the hotkey the highlight isn't triggered. Does anyone know a way to trigger the highlight?
I've…

twe4ked
- 2,832
- 21
- 24
4
votes
2 answers
Popover NSStatusItem
I'm playing around with an idea and basically I want a NSStatusItem with a NSPopoverController. I read about all the problem people had but I just want to try it. Is there a clean way to do it by now? All the versions I've seen are at least 1 year…

Constantin Jacob
- 488
- 1
- 8
- 21
4
votes
2 answers
Implementing NSPopover on NSStatusItem
I currently have an NSStatusItem for the status bar that is initialized in awakeFromNib like this:
statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
[statusItem setMenu:statusMenu];
[statusItem…

Josh
- 81
- 1
- 1
- 8