The NSPanel class implements a special kind of window (known as a panel), typically performing an auxiliary function.
Questions tagged [nspanel]
92 questions
2
votes
1 answer
about panel in menubar application is not frontmost when activated
I have an application that lives in the menubar, without a main menu or dock icon. I have a button that triggers [NSApp orderFrontStandardAboutPanel:sender];. When that button is clicked, sometimes, the About panel becomes frontmost. Other times,…

rick
- 1,075
- 4
- 20
- 29
2
votes
2 answers
Cocoa: NSPanel loses parent and other strange behaviour
I have an issue with an NSPanel acting strangely and have created a Sample App to demonstrate this behaviour.
The App was generated from Xcode 4's template and simply creates a panel and then opens and closes it based on button presses:
The strange…

trojanfoe
- 120,358
- 21
- 212
- 242
1
vote
1 answer
How to tell when NSPanel gets focus or becomes key?
I am writing a Cocoa/Objective-C app in XCode4, and I need to know when my preferences panel is opened. I need some callback like windowDidBecomeKey; I attempted to follow the solution provided in this question, but neither windowDidBecomeKey or…

WilHall
- 11,644
- 6
- 31
- 53
1
vote
0 answers
NSVisualEffectView not applying intended "frosting" effect
Modern applications increasingly often use the typical "frosting" effect for their window backgrounds. Such an effect usually consists of a combination of blurring and playing with the vibrancy of the background. To my knowledge, and according to…

linus_hologram
- 1,595
- 13
- 38
1
vote
1 answer
Changing the titlebar height in an NSPanel
I'm trying to change the titlebar height of an NSPanel. I tried the following but it didn't work as expected:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSRect f = [[[window contentView] superview] frame];
…

Larry
- 397
- 3
- 10
1
vote
0 answers
Resusing a panel for multiple documents in a document based application
I'm creating a Document-Based Applications and I'd like to use a single NSPanel that is reused across multiple open documents.
I should be able to change settings in the NSPanel for the first open document and then click on another open document.…

devin_s
- 3,345
- 1
- 27
- 32
1
vote
2 answers
MacOS: how to get NSPanel to resist key focus (with becomesKeyOnlyIfNeeded?)
In MacOS/Cocoa/Swift 4.2/Xcode 10.1 I’m trying to create an NSPanel that floats over my document window as a lightweight markup palette that interacts with a (primarily keyboard-based) editing session happening in the document window.
I have mostly…

Nicholas Jackiw
- 75
- 7
1
vote
3 answers
HUD NSPanel less transparent
I've been searching for the web but I have not encountered the way to change the HUD's transparency (ALL the panel transparency, including title bar). It's possible to change it?
Thx

Andreu
- 11
- 2
1
vote
2 answers
How to create a float window floating above all other windows just like twitter?
The twitter app has a float window when you click the contextual menu "Tweet",is it a NSPanel?
How to?

NeXT5tep
- 861
- 1
- 11
- 23
1
vote
0 answers
NSSavePanel appears differently between applications, even with identical code
I was having trouble with an NSSavePanel in my project, so to try to isolate the problem, I created a test project that included only the NSSavePanel code in the default window's viewDidLoad.
Test Project
The code I used to show the…

yesthisisjoe
- 1,987
- 2
- 16
- 32
1
vote
0 answers
Cannot paste text inside menu item's popup panel
I have a menu application and I'm launching a NSPanel from a menu item: when the user clicks on the menu item I lazily instantiate a custom NSWindowController (just the first time), and then I show it calling showWindow:
The custom NSViewController…

Ramy Al Zuhouri
- 21,580
- 26
- 105
- 187
1
vote
1 answer
NSPanel causes subsequent use of NSOpenPanel to generate an exception
I have an app that uses a NSOpenPanel so that the user can select multiple files for import and also has a typical preferences panel. The prefs panel is stored in the .xib file.
A problem occurs after the user has called up the preferences panel.…

Todd
- 1,770
- 1
- 17
- 42
1
vote
1 answer
How to detect when a NSPanel closes as a result of losing focus? E.g. A user clicking outside of the NSPanel (Window?)
I have a generic NSPanel window that I am using as a preferences window in my app. I have a selector that I call every time the window closes. The purpose of that selector is to save the state of the users chosen preferences (there is no "save"…

skålfyfan
- 4,931
- 5
- 41
- 59
1
vote
0 answers
NSTableView reload in NSPanel (not main window)
From my main window i open a NSPanel in the second screen and in content view i have a NSTableView.
On reloadData the TableView make the refresh but on screen the data didn't refresh.
I have to make F3 or change Desktop and the TableView refresh…

boompa
- 61
- 3
1
vote
1 answer
How to implement my own pop-up control in Cocoa?
I want to make a custom autocomplete control for my NSWindow, sort of like Xcode's fancy one, but I can't quite figure out how.
I made an NSPanel with its own NSWindowController, and I display it with some code like:
_popupController =…

user241221
- 1
- 9