SOMEONE
SOMEONE

Reputation: 5

Cocoa: get position of an NSStatusBar item

How can I get the position or frame of an NSStatusBar item?

Upvotes: 1

Views: 750

Answers (1)

hamstergene
hamstergene

Reputation: 24439

  1. There is undocumented [statusBarItem _window] method.
  2. Assign a view to the item, and then use view's window method.

There is no documented way to get it without setting a view. And when status bar item has a view, you have to draw title/image/everything yourself.

Upvotes: 1

Related Questions