Questions tagged [nspopover]

NSPopover is a Cocoa control to temporarily show additional info in a popup like window that automatically disappears for user actions not related to the popover.

The NSPopover class was added in OS X 10.7 for tasks like events in the calendar app (see year overview). Apple's documention for the class is here: NSPopover Class Reference.

216 questions
5
votes
3 answers

NSAlert above NSPopover

I have an NSPopover which displays from an NSStatusItem. This Popover shows NSAlerts from time to time. The problem is these alerts always appear below the popover, even though they become the key window. Even if I drag it it's still below the…
Mark Bridges
  • 8,228
  • 4
  • 50
  • 65
5
votes
2 answers

NSStatusItem app focus

How can my menubar application achieve the same behaviours as 1Password or Dropbox: clicking their menu bar icons or popovers does not steal focus, e.g. while I am in for example TextEdit and open 1Password/Dropbox, the blinking cursor disappears…
iMaddin
  • 982
  • 1
  • 14
  • 23
5
votes
2 answers

Show NSPopover when the application starts

I am using Pyobjc to create a NSStatusItem. When it is clicked, I am showing an NSPopOver. This is working fine. However, my requirement is to show the popover as soon as the application starts without any action by the user. Calling the callback…
Pradeep Vairamani
  • 4,004
  • 3
  • 36
  • 59
5
votes
2 answers

Animating Auto Layout changes concurrently with NSPopover contentSize change

I'm attempting to reproduce the iTunes 11 behavior of navigable views within a popover. I can't seem to find a way to get my animation to happen at the same time as the popover's contentSize change happens, though. The basic setup I have is a custom…
Tim
  • 59,527
  • 19
  • 156
  • 165
4
votes
1 answer

Swift ui macOS menuBar NSPopover no arrow

How do I remove the arrow from the NSPopover? Can you give me a hand? AppDelegate: import Cocoa import SwiftUI @main class AppDelegate: NSObject, NSApplicationDelegate { var popover = NSPopover.init() var statusBar: StatusBarController? …
Paul
  • 3,644
  • 9
  • 47
  • 113
4
votes
1 answer

NSOutlineView in NSPopover not readable in OSX 10.10 Yosemite

I have a NSPopover containing a NSOutlineView (source list) that is displayed over a usually dark background (but it's not always dark). The NSOutlineView has a transparent background to blend nicely with the NSPopover view. This looked great in OS…
rasmus
  • 3,136
  • 17
  • 22
4
votes
1 answer

Cocoa: NSUserNotification appears behind NSPopover

I have no idea where to even start trying to fix this but maybe someone can point me in the right direction. I have a status item application that shows a popover when clicked, some user interactions produce an NSUserNotification to warn/inform…
Elbimio
  • 1,041
  • 2
  • 10
  • 25
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
4
votes
1 answer

Converting NSTextView coordinates to screen coordinates

In my app I want to show popover in NSTextView and need to convert coordinates of selected rect in NSTextView to screen coordinates. I've tried this code: NSWindow* viewWindow = [self window]; NSRect rect = [self firstRectForCharacterRange:[self…
Akki
  • 1,487
  • 14
  • 25
3
votes
1 answer

How to increase the icon button of Menu in MacOS App SwiftUI?

I want to increase the icon button of the Menu in SwiftUI for a macOS app, but modifiers such as .imageScale(.large), .resizable(), .scaleEffect(1.2), and changing font doesn't work. image Menu { Button("Quit") {} } label: { …
fuzzzlove
  • 183
  • 1
  • 6
3
votes
1 answer

NSTextField not active in NSPopOver

I have a menubar application, which open a popover. That popover contains NSTextField and few buttons. The problem is that the NSTextField is non-selectable, it's impossible to type anything in it. However, it's possible to click on it with mouse…
nukl
  • 10,073
  • 15
  • 42
  • 58
3
votes
1 answer

NSPopover below caret in NSTextView

I know that in order to show a popover I need an NSView, but I don't think that there is one associated with the caret (inside the NSTextView). Is there a way to show a NSPopover below the caret? I tried to alloc a NSView and position it using…
Donovan
  • 6,002
  • 5
  • 41
  • 55
3
votes
1 answer

Emoji List in NSPopover on macOS like Messages App

I want to show an NSPopover in my Mac app that lists the emoji just like Apple's Messages app does like this: All I can figure out so far is that I can show the character palette in my app using this: NSApp.orderFrontCharacterPalette(nil) But…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
3
votes
2 answers

How can I make my app behave like I'm changing Application is agent(UIElement) at runtime using Swift?

I am coding a Mac app that is an NSPopover on the right side of the menu bar (Application is agent(UIElement) is set to YES). I allow the user to detach the popover by clicking and dragging it downward, which puts the app inside of a window. This…
TonyStark4ever
  • 848
  • 1
  • 9
  • 24
1 2
3
14 15