• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSFontPanel for a modal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFontPanel for a modal window


  • Subject: Re: NSFontPanel for a modal window
  • From: Kurt Sutter <email@hidden>
  • Date: Sat, 13 Jun 2015 10:33:00 +0200

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 <email@hidden> wrote:
>
>
>> On 13 Jun 2015, at 3:08 pm, Kurt Sutter <email@hidden> 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 (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


  • Follow-Ups:
    • Re: NSFontPanel for a modal window
      • From: Graham Cox <email@hidden>
References: 
 >NSFontPanel for a modal window (From: Kurt Sutter <email@hidden>)
 >Re: NSFontPanel for a modal window (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSFontPanel for a modal window
  • Next by Date: Re: Language options: Objective-C, Swift, C or C++?
  • Previous by thread: Re: NSFontPanel for a modal window
  • Next by thread: Re: NSFontPanel for a modal window
  • Index(es):
    • Date
    • Thread