The NSPanel class implements a special kind of window (known as a panel), typically performing an auxiliary function.
Questions tagged [nspanel]
92 questions
0
votes
4 answers
unlockFocus called too many times
I click on a NSButton (openPanel) which is located on the main window of my OS X app to show a NSPanel (myPanel) using the following method:
- (IBAction)openPanel:(id)sender {
[_myPanel makeKeyAndOrderFront:nil];
}
Everything works as expected…

DORI
- 54
- 1
- 8
0
votes
2 answers
NSPanel - Why can I not set my Panel title and data values before showing the window?
Simple structure:
exampleController.h :
#import
@interface exampleController : NSWindowController {
@public
IBOutlet NSPanel *entryPanel;
@property (nonatomic, strong) IBOutlet NSPanel…

skålfyfan
- 4,931
- 5
- 41
- 59
0
votes
1 answer
How and where can I change the animation of closing a NSPanel when I click the red close button?
I present a NSPanel in a NSWindowController. When I press the little red button of the titlebar of the NSPanel I would like to change the way it disappears with a different animation. How do I do that? Is there something like…

julesmummdry
- 241
- 2
- 4
- 14
0
votes
1 answer
How do I do something after the next NSView -layout has occurred?
In response to a user event, I want to:
add a new NSView to the window, and then
show an NSPanel positioned just below that view
I have each half of this done. I can add a new subview, and the container view's -updateConstraints identifies it and…

user3277676
- 143
- 1
- 5
0
votes
1 answer
how to write a toggle method to open/close a window?
I have an NSPanel window in my app that I want to toggle open and close with a button on the toolbar. This seems like a fairly basic operation, and indeed one I see in many apps (like Inspector views). However, I'm struggling to find the right way…

applehelpwriter
- 488
- 3
- 8
0
votes
1 answer
Alert above a NSPanel?
I have a NSPanel.
I use the following code:
[NSApp beginSheet:
modalForWindow:[[self view] window]
modalDelegate:self
didEndSelector:nil
contextInfo:nil];
This Panel has a view that contains a…

Neelam Verma
- 3,232
- 1
- 22
- 33
0
votes
3 answers
Close custom NSPanel with NSTimer in Cocoa
I created custom NSPanel and I show it bengin with Sheet. On it do not have any button to close, I want to close this panel with NSTimer after 10s. How can I do that?
[[NSApplication sharedApplication] beginSheet: scanningPanel
…

Joson Daniel
- 409
- 1
- 9
- 18
0
votes
1 answer
Displaying NSPanel as a sheet creating offset
I'm using this code to show a panel :
- (void)displayPanelWithView:(NSView *)view andTitle:(NSString *)title {
[panel setTitle:title];
if ([windows count] < 1) {
[panel setContentSize:[view frame].size];
[panel…

Fatso
- 1,278
- 16
- 46
0
votes
1 answer
NSPanel with NSWindowController shows up in xcode but not in archived app
I have the problem, that my PreferencePanel only shows up if I launch it from Xcode in release and debug mode. But if I start the archived .app of my application, nothing happens if I click my Preferences button. If launched from Xcode, if I open…

Andreas Pfohl
- 23
- 4
0
votes
0 answers
How to avoid NSpanel to be opened as different objects
I'm having a NSCollectionView consist of 10 NSButtons and also dragged a NSpanel from object library. If i click a button NSpanel should be appeared.If i clicked the next button, last generated NSpanel should closed and another NSpanel was opened.…

Muruganandham K
- 5,271
- 5
- 34
- 62
0
votes
1 answer
How to prevent mouse event when a sheet display?
I found that the NSView's rightMouseUp could still be active when a sheet display.I used this code.
[NSApp beginSheet:editPanel
modalForWindow:window
modalDelegate:self
didEndSelector:@selector(didEndSheet:returnCode:contextInfo:)
…

gohamgx
- 273
- 2
- 16
0
votes
2 answers
How to make it from top ? (Cocoa sheet)
I have implemented my sheet (NSPanel) with the following method:
- (void)showInWindow:(NSWindow *)mainWindow {
if (!finestra1)
[NSBundle loadNibNamed:@"XibName" owner:self];
[NSApp beginSheet:finestra1 modalForWindow:mainWindow…

Alberto
- 4,212
- 5
- 22
- 36
0
votes
0 answers
NSPanels disappearing when "Agent" application launched in background
I used the Cocoa "Status Bar" tutorial (http://cocoatutorial.grapewave.com/tag/status-bar/) as a starting point in an attempt to build myself an agent that only appears as a StatusItem.
This application has no main NSWindow object, and it has three…

Ned W.
- 163
- 1
- 6
0
votes
1 answer
Custom Window Style in Cocoa
OK, this is what I'm trying to do :
I have a custom NSPanel subclass
I want the NSPanel to be borderless (NO title - I'm drawing a titlebar myself) AND resizeable
The thing is that :
once I set the styleMask to NSResizableWindowMask, the default…

Dr.Kameleon
- 22,532
- 20
- 115
- 223
0
votes
1 answer
Making a palette permanently active/focused?
Is there a simple way that I can make my application's floating tool palettes permanently active? They are all relevant to the open document, so there is no reason for them to be inactive at any point in time.

John Wells
- 1,139
- 1
- 10
- 27