On 22/04/2009, at 10:48 AM, Graham Cox wrote:
On 22/04/2009, at 10:36 AM, Jerry Krinock wrote:
I get a default menu from a newly-created popup button cell by
sending
-[NSPopUpButtonCell menu]
How can I find out the font used in this menu? (It's an NSMenu.)
I don't see any 'font' accessors, and -[NSMenuItem attributedTitle]
returns nil.
I can't see any way to do this - NSMenuItem's don't use cells, and
there are no accessors. Menus use Carbon underneath, but all of the
functions such as GetMenuItemFontID are unavailable for 64-bit.
You can either assume that [NSFont menuFontOfSize:] is reasonable,
or set an attributed title and take that apart.
I suppose I should also have asked - why do you need to know?
--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com