Thanks, Graham! However, I don’t want the panel to get key focus by default. Just as in TextEdit, the font panel should come up, the focus should however remain with the text window. The user can then e.g. click another font in the font panel (which will update the font in the text window) and then just go on typing in the text window without first moving the key focus back into the text window.
Calling makeKeyAndOrderFront takes the key focus away from the text field. Calling setWorksWhenModal:YES and/or setBecomesKeyOnlyIfNeeded:YES does not seem to resolve the issue either. I am at a loss here. Kurt > On 13 Jun 2015, at 09:17, Graham Cox <graham....@bigpond.com> wrote: > > >> On 13 Jun 2015, at 3:08 pm, Kurt Sutter <k...@quansoft.com> wrote: >> >> I then bring up the font panel calling [NSFontPanel sharedFontPanel] >> >> The font panel comes up, and does not have key focus > > > Just asking for the sharedFontPanel isn’t enough. You still need to show it > using -makeKeyAndOrderFront:, and as an NSPanel subclass, you might also need > to -setWorksWhenModal:YES and -setBecomesKeyOnlyIfNeeded:YES. > > By the way Apple, the Font Panel sucks. Please give it some love in 10.11 > > —Graham > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com