NSWindow child window and key status
NSWindow child window and key status
- Subject: NSWindow child window and key status
- From: Ben <email@hidden>
- Date: Mon, 15 Jun 2015 21:38:07 +0100
Hi list,
I'm trying to replicate a portion of UI in a manner similar to the formula editor of Numbers. For those not familiar, its a widget that floats above the spreadsheet grid featuring a text view and a button or two.
Currently I am using the addChildWindow:ordered: method on NSWindow to add a custom borderless window above the grid view and putting an NSTextView in that window. So far so good.
However, it appears that the parent window of an NSTextView needs to be the key window in order to receive key events. When I allow the child window to become key, the 'real' document window containing the main spreadsheet control loses focus (i.e. the traffic light buttons grey out and the title bar becomes its inactive colour).
Does anyone know how to allow my NSTextView in a child window to be edited, without the parent window losing focus?
NSPopover seems to be able to do it, but this might involve private API. Ideally I'd like to do it without having to subclass the parent window.
Thank you for any pointers,
Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden