Questions tagged [nsstatusbar]

The NSStatusBar class defines an object that manages a collection of NSStatusItem objects displayed within the system-wide menu bar.

The NSStatusBar class defines an object that manages a collection of NSStatusItem objects displayed within the system-wide menu bar. A status item can be displayed with text or an icon, can provide a menu and a target-action message when clicked, or can be a fully customized view that you create.

Use status items sparingly and only if the alternatives (such as a Dock menu, preference pane, or status window) are not suitable. Because there is limited space in which to display status items, status items are not guaranteed to be available at all times. For this reason, do not rely on them being available and always provide a user preference for hiding your application’s status items to free up space in the menu bar.

94 questions
1
vote
1 answer

How to create a NSMenu Instance with SwiftUI?

I have look made some search, however could not find any information. Question is pretty straight-forward. I don't know if it is possible, but, in this link they could create a NSMenu item via xib files. So I thought maybe it is possible to create…
Faruk
  • 2,269
  • 31
  • 42
1
vote
0 answers

NSStatusItem doesn't work in fullscreen mode starting 10.13

Very simple application. When any other application is in fullscreen mode my apps system tray drop down menu doesn't show up. Other application like system time's drop down shows up properly. No app in fullscreen Xcode app in full screen (icon is…
JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51
1
vote
2 answers

How to prevent my macOS Menu Bar app from disappearing

I've been playing around with creating a Menu Bar app for macOS. The app consists of an icon along with a title. The title displays additional context and can be dynamic width. I've noticed that when the Menu Bar does not have enough room to display…
Simon
  • 2,065
  • 3
  • 21
  • 28
1
vote
1 answer

MacOS statusbar app show menu and run function on click with swift 3

I'm making a small menubar app with Swift 3, I want the app to reload some data when I click the icon, but I also want it to show the statusMenu? Below is a sample of my code: // AppDelegate.swift import Cocoa @NSApplicationMain class…
Harold
  • 365
  • 2
  • 9
1
vote
1 answer

How to dynamically place NSView in relation to NSStatusBar?

I have created a NSStatusBar NSMenu like this: - (NSMenu *)startUpViewBarMenu { NSMenu *menu = [[NSMenu alloc] init]; NSMenuItem* info = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; //[info setTarget:self]; …
maxisme
  • 3,974
  • 9
  • 47
  • 97
1
vote
1 answer

Status bar font is bold for some reason

The clock, carrier, battery part in my device is normal, like in 1st picture. When I open my app, after loading the app in memory it starts to animate and make the navigation bar bold and bigger font. I am not even sure if this is a good or bad…
Esqarrouth
  • 38,543
  • 21
  • 161
  • 168
1
vote
0 answers

What is the vertical property on NSStatusBar?

I just looked at the Apple documentation for NSStatusBar, and found this curious property: vertical Property A Boolean value indicating whether the status bar has a vertical orientation. >(read-only) Declaration @property(getter=isVertical,…
tbodt
  • 16,609
  • 6
  • 58
  • 83
1
vote
0 answers

Status bar app popover always on top when mission control is launched OSX

I'm working on a status bar app for OSX and I'm trying to replicate the behaviour of the popover that Dropbox uses, so far I've managed to get all of the desired behaviour working except for the fact that when I open mission control the popover…
1
vote
3 answers

NSStatusItem reordering along Status Bar

I am trying to add a functionality to my status bar app for Mac OS X. I would like to be able to move my item along the bar, as you can do for the native OS tools like the Bluetooth or the WiFi icon. Cheers
Fabrizio Demaria
  • 453
  • 1
  • 4
  • 15
1
vote
1 answer

Delphi tray icon (NSStatusItem) for OSX

I am trying to add NSStatusItem in a Delphi application for OSX. Searched for sample code to help me with that but got stuck when defining an interface: Here is the code: // Source: https://forums.embarcadero.com/thread.jspa?threadID=108449 unit…
Jamie
  • 657
  • 7
  • 18
1
vote
3 answers

RUMPS Updating Application Title

So I've been working on a little python application using rumps and I'd like to periodically update the title of the application in the status bar. There appears to be a function in rumps that should do what I'm looking for but I can't seem to get…
1
vote
1 answer

Set a menu bar applications font using an IBAction

Might a method exist to set a menu bar applications titles font also font size using an IBAction, (set font also font size for "title") statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]…
coltcdc
  • 71
  • 8
1
vote
4 answers

Change a menu bar applications font size

Might a simple method of changing a menu bar application titles font size exist, making @"title" display smaller (or larger) than default statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]…
coltcdc
  • 71
  • 8
1
vote
1 answer

NSTextField isn't active on NSPopover attached to NSStatusItem

I have a NSStatusItem created like this: statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; [statusItem setTitle:@"DS"]; [statusItem setHighlightMode:YES]; [statusItem…
ksoftware
  • 137
  • 1
  • 9
1
vote
1 answer

NSStatusItem Blocks User Interface Updates in NSWindows

I'm working on an application, There are several NSWindows in this application and one StatusItem in order to access any of NSWindows when they are not open. Some of these windows continuously updating their interface with new numbers and statuses.…
Abcd Efg
  • 2,146
  • 23
  • 41