Questions tagged [nspanel]

The NSPanel class implements a special kind of window (known as a panel), typically performing an auxiliary function.

86 questions
30
votes
1 answer

Tips on NSApp’s ModalForWindow, NSAlert’s ModalForWindow, and ModalSession

It took me quite a bit of experimentation to clear up some confusion over Objective-C’s “ModalForWindow” language and, subsequently, how to use a modal session. Maybe the following tips will save somebody some time: (In case you’re new to the…
Wienke
  • 3,703
  • 25
  • 38
12
votes
1 answer

NSPanel in "Non-Activating"-Mode does not always show correct cursors

I've created a simple Cocoa-Application in XCode 4.6 with an NSPanel instead of the default NSWindow. When I enable the Non-Activating option and start the application everything works fine: The panel is displayed in front of everything else and…
jimmyorpheus
  • 221
  • 1
  • 3
7
votes
2 answers

NSPanel with "Title Bar" unchecked in Interface Builder does not appear

So I thought I had covered my bases, but apparently I'm missing a key step or two. I have an NSPanel that is displayed (makeKeyAndOrderFront:) when an NSStatusItem is pressed. Things work great, but as the NSPanel displays a title bar, the panel is…
Craig Otis
  • 27,979
  • 23
  • 117
  • 216
7
votes
3 answers

Allow an NSWindow (NSPanel) to float above full screen apps

I'm trying to add a little window that provides "quick input" from any place in the system to the main app. The user could hit a hotkey, the window pops up, and floats above all other windows. For the most part, this isn't much of a problem. I can…
radex
  • 5,846
  • 4
  • 26
  • 38
7
votes
4 answers

Prevent activating the application when clicking on NSWindow/NSView

I'm working on a screenshot Mac app. I'm trying to rebuilt what happens when you press Cmd-Ctrl-Shift-4: the cross hair cursor and the selection rectangle for the screenshot. I'm using a custom borderless NSWindow on top of all other windows. I…
Mark
  • 5,965
  • 1
  • 37
  • 77
6
votes
1 answer

Create a HUD window programmatically

I need to create a HUD-like window programmatically when the user press on my main view. Here's the code I use, but I only get a standard window. videoWindow= [[NSPanel alloc] initWithContentRect:NSMakeRect(200.0, 200.0, 300, 200) …
user531461
5
votes
1 answer

Make NSView in NSPanel first responder without key window status

Is it possible to give an NSView inside an NSPanel first responder status without giving the NSPanel key window status (making the main application window resign key)? Thanks.
indragie
  • 17,634
  • 15
  • 89
  • 161
5
votes
1 answer

How to Convert NSURL to CFURLRef

Apple gives sample code for Creating PDF document. But It uses CFURLRef NSPanel savepanel gives NSURL. I can't convert NSURL to CFURLRef path = CFStringCreateWithCString (NULL, filename, kCFStringEncodingUTF8); url =…
4
votes
2 answers

Tabs in iWork-style Inspector panel

how does one get the look of the tab buttons as they appear in iWork '09 Inspector NSPanel? Closest I could get is NSSegmentedControl with "Small Square" style. Unfortunately, at least under Snow Leopard that results in grayed selection instead of…
Ivan Vučica
  • 9,315
  • 7
  • 57
  • 109
4
votes
2 answers

set NSWindow focused

I have an app winth one window and one panel, attached to this window. steps: deactivate my app (app opened, but without the focus) click on a button on panel (panel is focused now, but main window is not) How to set focus to the main window…
BUDDAx2
  • 279
  • 1
  • 3
  • 19
4
votes
1 answer

Is it possible to use the blur behind Core Animation(effect) on an NSPanel?

The context menu from dock items is not only translucent but also blurs the contents behind it, Is this effect availible for translucent floating panels? This is the same effect used in Sheet Alert dialogs (e.g. quit with unsaved changes) but in…
4
votes
1 answer

NSPanel removed in Xcode 8?

In the past I can find Panel available in Interface Builder's Library, but in Xcode 8, I searched the whole library in storyboard editor, no Panel available. Has Apple just removed NSPanel or I got something wrong?
Xiao Xiao
  • 861
  • 8
  • 18
4
votes
2 answers

NSSavePanel crashes on Yosemite

I am using NSSavePanel to save image. I have used IKSaveOption which gets added to the NSSavePanel. When save panel tries to open the sheet for window it crashes saying - *** Assertion failure in -[IKSaveOptionsContainer…
4
votes
1 answer

How to make resize cursors show up for a floating non-activating panel?

I have a floating NSPanel that is non-activating, i.e. its styleMask contains the NSNonactivatingPanelMask flag. Since this panel never becomes active, the system does not show the usual resize cursors when getting close to one of the panel's…
Florian Kugler
  • 688
  • 6
  • 10
4
votes
1 answer

NSWindow / NSPanel can't show in front of full-screen application

In my app, there is a utility window (actually it is a NSPanel object). It would show up sometime and be in front of other application's window. But when other application runs in full-screen mode, the utility window doesn't show. But I found that…
Gon
  • 1,085
  • 12
  • 19
1
2 3 4 5 6