Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.