2

My Mac OS X application has a NSStatusItem.

It works fine, however, I just discovered that apparently if there are too many items in the top menu/status bar (for instance, if an app has long menus, there are too many icons, etc.), my status item gets hidden by the system.

How can I detect this in my application, so that I can do something about it?

Thanks

houbysoft
  • 32,532
  • 24
  • 103
  • 156
  • Probably make it smaller, so that it gets shown.. – houbysoft Jul 29 '11 at 12:54
  • I don't know if it's an appropriate UI for your application, but have you considered a preference pane, perhaps? It's not as convenient as a menu bar extra, but the user can always access System Preferences (either via the Dock or via the Apple menu). – Extra Savoir-Faire Aug 03 '11 at 04:18
  • @trudyscousin : well it's a monitor-like app, so it's supposed to be shown at all times; thus hiding it in the Prefs would not be possible. Thanks for your help anyway though! – houbysoft Aug 04 '11 at 19:44

2 Answers2

0

On page 18 of the 26 July 2011 edition of the Mac OS X Human Interface Guidelines (where status items are referred to as "menu bar extras"), it is stated:

Note: If there isn’t enough room to display all of the active app’s menus, Mac OS X can omit some menu bar extras. If there is still insufficient room to display all menus, some of the app’s menus may be omitted, starting with the rightmost menu.

So to answer your question, "(Can I) do something about it?", the answer is: No. You have to think of the menu bar extra as the 'extra' that it is called, an additional convenience. If you really want to use this UI element, you do so by providing one that does not contain commands critical to the user's control of your application. Rather, you should provide those that can be accessed from elsewhere in your application.

Extra Savoir-Faire
  • 6,026
  • 4
  • 29
  • 47
  • Hmm, looks like there really is no way to know. The problem is, I'm writing a window-less, dock-icon-less application, that just sits in the menu bar (similar to e.g. Dropbox). In other words, the menu bar is the only interface. – houbysoft Aug 02 '11 at 19:10
0

This question is pretty much a duplicate of this. There is a very disingenuous solution described in the link for solving your problem though it requires more work than you'd expect.

Community
  • 1
  • 1
hollow7
  • 1,506
  • 1
  • 12
  • 20