• 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
How to enable/disable the menu items Font > Bold/Italic on Leopard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to enable/disable the menu items Font > Bold/Italic on Leopard?


  • Subject: How to enable/disable the menu items Font > Bold/Italic on Leopard?
  • From: Schwill Daniel <email@hidden>
  • Date: Thu, 29 Nov 2007 10:57:57 +0100

Hi,

I'm changing the font traits bold and italic in my app not directly in an NSTextField or NSTextView, but for one or multiple selected objects. I'm using NSFontManger and set the current font or fonts for the selected objects with setSelectedFont:isMultiple: depending on a single or mutiple selection.

In validateMenuItem: for the menu items Font > Bold/Italic I'm using [[NSFontManager sharedFontManager] validateMenuItem:menuItem] to detect whether the font trait bold or italic is available for the selected fonts or not. This works fine on Tiger but doesn't seem to work on Leopard, as this method always returns YES on Leopard even when the currently selected font of the shared NSFontManger doesn't support this font trait.

Any hints how I can easily detect on Leopard whether the menu items Font > Bold/Italic can be used/enabled to change the traits bold/ italic for the currently selected font of the shared NSFontManger?

Regards,

   Daniel

_______________________________________________

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


  • Prev by Date: Re: NSFontManager addFontTrait: not working as expected
  • Next by Date: Re: Leopard NSTableView Cell and single click editing
  • Previous by thread: Re: [OT] Chown returns file lock error
  • Next by thread: How to show CGImageRef over an overlay nswindow.
  • Index(es):
    • Date
    • Thread