Questions tagged [nsstatusitem]

The NSStatusItem class represents the individual elements displayed within an NSStatusBar object.

218 questions
2
votes
1 answer

NSView added to NSStatusItem button has an opaque border

I have been working on a NSStatusItem user agent that adds a NSView subclass as a subview of NSStatusItem.button to provide animated icons. When left clicking on the icon, there is a noticeable opaque border around the view. The view subclass's…
Erik
  • 898
  • 8
  • 20
2
votes
2 answers

NSStatusItem not keyboard navigable

I've created an NSStatusItem for my app, but would like it to be navigable, as the system items are, when using Control+F8 (Control+fn+f8). The status item is inexplicably skipped in the navigation sequence. Is there a secret handshake of accepting…
voidref
  • 1,113
  • 11
  • 15
2
votes
2 answers

NSStatusItem setTitle is ignored on Yosemite

I've been working on a new feature for Mac support in Qt. Basically, it's about adding a NSStatusItem::title() support. Since Qt is a C++ framework, I am working in scope of ObjC-binding (corresponding method is declared in C++ header and defined in…
2
votes
1 answer

Attach NSMenu to NSStatusItem with Storyboard

I am trying to attach an NSMenu item to a NSStatusItem to have a menu when clicking on my Menu Bar App for Mac OS. I am new to Mac programming and I searched tutorials on the Web. However, all the material I found involves the usage of the file Xib…
Fabrizio Demaria
  • 453
  • 1
  • 4
  • 15
2
votes
1 answer

In Objective-C/Cocoa, are there global events for when mission control is activated or spaces are changed?

I'm currently working on an OSX menubar app that uses a custom status item view and a NSPopover to display content. I'm trying to get it to dismiss at times that would make sense like when spaces are changed, since the popover doesn't move spaces…
2
votes
1 answer

Monobjc :: Add NSStatusItem

I'm trying to add an NSStatusItem from within the Monobjc bridge for Mono. The function gets called, and doesn't throw an exception, but my icon doesn't appear :(. Here 's my code: #define DEBUG_APP using System; using Monobjc.Cocoa; using…
friedkiwi
  • 2,158
  • 8
  • 29
  • 52
2
votes
1 answer

NSStatusItem With Multiple Buttons

Trying to get an NSStatusItem to have multiple buttons like this picture https://i.stack.imgur.com/iMqgL.png. Each button as a different function -- the pause button pauses, the skip button skips, etc. I don't want a dropdown menu, I want it all to…
2
votes
3 answers

How to draw a native looking statusitem background on a CALayer

Actually I want to draw the background of a selected NSStatusItem on the CALayer of my custom statusItemView. But since - (void)drawStatusBarBackgroundInRect:(NSRect)rect withHighlight:(BOOL)highlight does not work (?) on layers I've tried it to…
papr
  • 4,717
  • 5
  • 30
  • 38
2
votes
1 answer

Custom NSStatusItem with custom view - Use NSWindow, NSView, custom NSMenuItem?

I'm trying to create a LSUIElement app that behaves like Spotlight, CoverSutra and other apps of that type. I managed to create a custom NSStatusItem, which popups up an NSWindow but the problem is that the app that currently has focus will the…
Luc
  • 61
  • 1
  • 3
2
votes
1 answer

Check if NSStatusItem is visible in system menu bar?

Is it possible to check if an NSStatusItem is visible in the system menu bar? It sometimes isn't due to the user having too many status items and the active application menu bar size. I can check the location of the of the status item via a "hack"…
user429620
2
votes
0 answers

NSStatusItem draw animation when highlighted

I'm using NSStatusItem in my project and I want it animated when my program is running. It is works fine when item is not selected. But when i'm clicking on it the image is freezing. I was trying to set alternate image by timer but no result. The…
Ankoma
  • 127
  • 1
  • 4
2
votes
1 answer

How to create a Status Bar popover view (menu)?

The triangle at the top looks so wonderful, but I can't compose one like that. I had tried to write some code as below, but I saw an ordinary menu. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {// Insert code here to…
jerrylei
  • 340
  • 1
  • 11
2
votes
1 answer

Check if an NSStatusItem is currently shown in the OS X NSStatusBar main menubar

My app puts an NSStatusItem in the OS X menubar. At some point, I want to remove the menubar icon from the system NSStatusBar. (I want to still retain the NSStatusItem at this point, and send messages to it... just not have it shown.) I'm using this…
ck_
  • 3,719
  • 10
  • 49
  • 76
2
votes
0 answers

NSSatusItem gets hidden if Application menu to large

Possible Duplicate: Being apprised of when NSStatusItem is hidden I'm currently working on a small Mac OS X app, that displays text in the status bar. I'm using a NSStatusItem with variable length if that helps. The problem I'm seeing is, that…
Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
2
votes
2 answers

Custom NSStatusItem and NSView not reliably receiving NSTrackingEvents

I have a Status-Bar item only app that Iam trying to get to show a panel on mouseOver. I have the custom status item (and associated view) hooked up and working, but the tracking rect is only receiving events on every dozen or so launches. This…
coneybeare
  • 33,113
  • 21
  • 131
  • 183