Setting (sub)menu items' font/size in NSPopUpButton
Setting (sub)menu items' font/size in NSPopUpButton
- Subject: Setting (sub)menu items' font/size in NSPopUpButton
- From: Ben Kennedy <email@hidden>
- Date: Sat, 13 Apr 2002 01:31:30 -0400
Hi all,
I have several NSPopUpButtons whose contents I initialize programatically
when my doc loads a file, by building NSMenu/NSMenuItem trees by hand and
then calling [popUpButton setMenu:someMenu];.
I have the buttons' font and size set smaller via the attributes panel in
IB, and accordingly they display their menus with the font when the app
runs... mostly.
The principal menu for the button looks fine, but if any of its items
contains a submenu, the submenu's items will render in the standard menu
font. How can I override this?
Issuing something like [popUpButton setFont:[NSFont menuFontOfSize:9]];
also works only to the same extent -- the principal menu only is affected.
Now, I have found that *moving* a principal menu from one NSPopUpButton
(that has been clicked at least once) to being the submenu of a menu item
somewhere else (via a dummy action method e.g.), it *does* from that
point on render with the desired font.
Quite simply, I want to be able to unify the font/style of all menu items
in an NSPopUpButton whether they are within submenus or not. How can I
achieve this?
-ben
--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.