How to enable/disable the menu items Font > Bold/Italic on Leopard?
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